> > > > you can make the .txt a php script and force pargins by php parser > > > > by using <Files> and SetHandler > > > > On 25.01.08 06:59, Kent Larsson wrote: > > > Thank you! But I still don't get it to work. > > > > > <Files "txtfilefromphp.txt"> > > > SetType application/x-httpd-php > > > </Files> > > Tried SetHandler as suggested? On 27.01.08 02:11, Kent Larsson wrote: > Yes, sorry about the typo in my last post. It was SetHandler I meant. > Still I am having one problem. do you mean, that the parsing by PHP works already and you see only php-generated content? > 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 > differences: i guess those differencies are added by PHP - you can search for PHP settings there or add own headers. But that's imho subject of PHP support forum, not this one. But it only applies when the PHP is parsed and executed, not when you see the 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 > approach? I'm not sure if mod_rewrite allows you do that. It allows you e.g. to run file.php when you request for file.txt but the headers should stay the same PHP generated. But I'm not rewrite expert. -- Matus UHLAR - fantomas, uhlar@xxxxxxxxxxx ; http://www.fantomas.sk/ Warning: I wish NOT to receive e-mail advertising to this address. Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu. My mind is like a steel trap - rusty and illegal in 37 states. --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx