Forum Moderators: phranque

Message Too Old, No Replies

Changing my HTTP response header

HTTP response header

         

shaowei

4:06 am on Feb 16, 2005 (gmt 0)

10+ Year Member



I would like to know if there is any way in which I can change my HTTP response header.

There's a site called web-sniffer.net that can get your http response header.

I notice a difference in the HTTP response header between a php site and a static html site.

PHP files has HTTP response header of
Date, Server, X-Powered-By, Set-Cookie, Expires, Cache-Control, Pragma, Connection, Transfer-Encoding and Content-Type.

HTML files has HTTP response header of
Date, Server, Last-Modified, ETag, Accept-Ranges, Content-Length, Connection and Content-Type.

I'm currently using forcetype on my server in such a way that my all my php file are saved in html filetype. However, the HTTP response header returned by these html files are still like those of the php files.

Is there anyway that I could change the HTTP response header of my "supposingly" html files to look like those of php files.

jdMorgan

4:43 am on Feb 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



ShaoWei,

This is a php question, I think... But you can certainly write arbitrary headers with either php or with Apache mod_headers.

Jim