Forum Moderators: bakedjake
Does someone know how to set a server, running unix Apache to return the Last-modify date from all the files/pages it serves.
I know this can be done with putting the adding the following meta header in the head section of a page:
<meta http-equiv="Last-Modified" content="Some_Date">
But a server can also be set to return this in the server headers returned, just don,t know where?
I had a look in the Apache Config-file, but I dont seem to find anything there.
Any server administrators online here?
Thanks and regards,
Sanuk
I use this in .htaccess. Setup for .httpd.conf should be similar. See Apache mod_headers [httpd.apache.org].
# Set up Cache Control headers
ExpiresActive On
# Default - Set http header to expire everything 1 week from last access, set must-revalidate
ExpiresDefault A604800
Header append Cache-Control: "must-revalidate"
# Apply a customized Cache-Control header to frequently-updated files
<FilesMatch "^(botlog¦test)\.html$">
ExpiresDefault A1
Header unset Cache-Control:
Header append Cache-Control: "no-cache, must-revalidate"
</FilesMatch>
<FilesMatch "^(calendar¦evnt\_sched¦4[0-9]{2}.?)\.html$">
ExpiresDefault A14400
</FilesMatch>
<FilesMatch "^index\.htm1">
ExpiresDefault A7200
</FilesMatch>
<FilesMatch "^robots\.txt$">
ExpiresDefault A7200
</FilesMatch>
You might also want to take a look at the XBitHack directive in mod_include [httpd.apache.org].
Jim
Thanks JP Morgan
I have been able to load mod_headers
it was in the config file but was commented out
But now I dont understand very well what to put in the .htaccess file, the explanation at Apache is not very clear about this, and not having English as my mother language also doesnt help with this.
The only thing I want is the server sending the Last-Modify header, nothing to do with cache-control or expire.
I have uncommentet the mod_header in config but am clueles of what to put in .htaccess.
Thanks a lot,
Regards,
Sanuk