httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kent Larsson" <>
Subject Re: [users@httpd] Dynamic text-file created by PHP
Date Sun, 27 Jan 2008 01:11:33 GMT
> > > On 25.01.08 06:59, Kent Larsson wrote:
> > > you can make the .txt a php script and force pargins by php parser by using
> > > <Files> and SetHandler
> >
> > Thank you! But I still don't get it to work.
> > <Files "txtfilefromphp.txt">
> >   SetType application/x-httpd-php
> > </Files>
> Tried SetHandler as suggested?

Yes, sorry about the typo in my last post. It was SetHandler I meant.
Still I am having one problem. I want the http response to look
_exactly_ as when retriving a normal text file. I changed expose_php
to no which got rid of one unwanted header. But still there are

= A real text file =

Response Headers
Date	Sun, 27 Jan 2008 01:05:15 GMT
Server	Apache
Last-Modified	Thu, 24 Jan 2008 19:33:03 GMT
Etag	"a40158-1a-e90699c0"
Accept-Ranges	bytes
Content-Length	26
Content-Type	text/plain; charset=UTF-8

= My php generated text file =

Response Headers
Date	Sun, 27 Jan 2008 01:05:17 GMT
Server	Apache
Keep-Alive	timeout=15, max=97
Content-Length	26
Connection	Keep-Alive
Content-Type	text/plain; charset=UTF-8

I can easily add the missing headers to the php generated text file.
But I don't want "Connection: Keep-Alive" or "Keep-Alive: timeout=15,
max=97" sent. That's my main problem at the moment. Any ideas on how
to not send those? Or how to "filter them out" using PHP?

Someone said I could use mod_rewrite to get an exact response which is
identical to the static normal text file from my php generated one.
But I don't know how to do that using mod_rewrite. Any ideas on that

Thanks for reading my post!

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message