I'm trying to add some future cache headers to my .htaccess.
Here's the code I'm using: <FilesMatch "\\.(ico¦gif)$"> Header set Expires "Thu, 15 Apr 2010 20:00:00 GMT" </FilesMatch>
I'm using apache 1.3.37.
Maybe my syntax is wrong?
Any help is appreciated!
coopster
10:10 pm on Nov 7, 2007 (gmt 0)
That first slash seems unnecessary but I don't think that is why you are receiving a 500 error. Check your logs for details such as this message ...
... Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration
... which means you don't have the Header module loaded. It is an extension module, not base.
jdMorgan
11:07 pm on Nov 7, 2007 (gmt 0)
If you're only trying to set the Expires headers, try using mod_expires instead.
Jim
cduke250
8:30 am on Nov 8, 2007 (gmt 0)
<IfModule mod_headers.c> # 1 YEAR <FilesMatch "\.(ico¦pdf¦flv¦jpg¦jpeg¦png¦gif¦swf)$"> Header set Cache-Control "public" Header set Expires "Thu, 15 Apr 2010 20:00:00 GMT" </FilesMatch> </IfModule>
jdMorgan
3:06 pm on Nov 8, 2007 (gmt 0)
Change all broken pipe "¦" characters in the code above to solid pipes before attempting to use the code; Posting on this forum modifies the pipe characters.
Jim
madmatt69
7:33 pm on Nov 8, 2007 (gmt 0)
Thanks for the responses!
I'm getting an error in my logs about the header..so its' not installed on my server.
I'm just going to ask my host to install it, and then see if the code works then.