httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Hayward http://JonathansCorner.com" <christos.jonathan.hayw...@gmail.com>
Subject [users@httpd] .htaccess/Expires/Cache-Control: 500 error
Date Fri, 19 Oct 2007 20:53:03 GMT
I am getting an internal server error (500) if I place the following in my
ROOT .htaccess:

<FilesMatch "\\.(ico|pdf|flv|jpg|jpeg|png|gif|css|swf)$">
Header set Expires "Sun, 18 Nov 2007 14:35:41 GMT"
Header set Cache-Control "max-age: 2764800; public"
</FilesMatch>
<FilesMatch "\\.(html)$">
Header set Expires "Sat, 20 Oct 2007 15:35:41 GMT"
Header set Cache-Control "max-age: 86400; public"
</FilesMatch>
<FilesMatch "/$">
Header set Expires "Sat, 20 Oct 2007 15:35:41 GMT"
Header set Cache-Control "max-age: 86400; public"
</FilesMatch>
<FilesMatch "\\.(js)$">
Header set Expires "Fri, 26 Oct 2007 15:35:41 GMT"
Header set Cache-Control "max-age: 604800; public"
</FilesMatch>

The error also occurs with the following, or if I replace the date with the
output of a Linux /bin/date after incrementing the hour by two.

<FilesMatch "\\.(ico|pdf|flv|jpg|jpeg|png|gif|css|swf)$">
Header set Expires "Sun, 18 Nov 2007 14:35:41 GMT"
</FilesMatch>

What is wrong with the longer and/or shorter files to be getting an internal
server error?

-- 
++ Jonathan Hayward, jonathan.hayward@pobox.com
** To see an award-winning website with stories, essays, artwork,
** games, and a four-dimensional maze, why not visit my home page?
** All of this is waiting for you at http://JonathansCorner.com

Mime
View raw message