Forum Moderators: phranque

Message Too Old, No Replies

Apache not providing "Last Modified" header - how to fix?

         

JohnKelly

5:36 pm on Sep 14, 2005 (gmt 0)

10+ Year Member



I'm running Apache in a Linux box, and need to include the last modified header in my pages. Problem is, all pages have SSI and/or PHP includes. I've got XBitHack Full in my .htaccess file, but still no Last Modified header. Is it even possible to get this with SSI/PHP without modifying every script that generates pages?

I also have full access to the httpd conf files, so any suggestions are welcome.

TIA

jd01

5:38 pm on Sep 14, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is it even possible to get this with SSI/PHP without modifying every script that generates pages?

Not that I have found. If I need them I set them in the scripts.

Justin

marcs

6:06 pm on Sep 14, 2005 (gmt 0)

10+ Year Member



Try something like (in .htaccess) :

Header set Last-Modified "Sun Jul 18 00:32:50 EDT 2004"

carrot63

5:34 am on Sep 15, 2005 (gmt 0)

10+ Year Member



Its not impossible I am missing the point, but if you want the last modified date in the page itself, the html, you can do it with 'echo' in SSI.

<!--#echo var='LAST_MODIFIED' -->

Will produce the last mod date for the page it is in. I use it in a meta tag like this:

<meta name="last-modified" content="<!--#echo var='LAST_MODIFIED' -->">

JohnKelly

2:44 pm on Sep 16, 2005 (gmt 0)

10+ Year Member



Thanks everyone... I'll probably use the .htaccess method and then update it when I update my pages.