Mod_expires

windows

Guest
OK...lets see if I understand this correctly:<br /><br />ExpiresActive On<br /># Set default expiry to six hours after last access<br />ExpiresDefault A21600<br /># Set expiry for image files to 30 days<br />ExpiresByType image/gif A2592000<br />ExpiresByType image/jpeg A2592000<br /># Set expiry for error pages to zero<br /><FilesMatch "^(erroré¡©å®±rbidden)\.html$"><br />ExpiresDefault A0<br /></FilesMatch> <br /><br />This should go into the .htaccess file of my public_html folder in order to apply the following rules to all documents within the public_html folder:<br /><br />set default expiration to 6 hours after last access<br />set expiration to 30 days for gif and jpg files<br />set expiration to 0 for error pages<br /><br />Question..can the comments in the script be left in the .htaccess file?<br /><br />Is there anything else I need to do to set this up?<br /><br />Thanks!<br /><br />OH...can someone explain to me why A2592000 30 days after access? I don't understand the logic of those numbers.<!--content-->
I have no clue.<br /><br />I do know though that there are 2592000 seconds in 30 days. (Yeah, I'm such a big help.)<!--content-->
Hey...help is help, Frylock!!! Thumbs Up<!--content-->
'Nuther question. I read this in another forum that I found through google:<br /><br /><!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->I think one point that is sticky is this: Apache won't serve Last-Modified or Expires headers on files which SSI-include other files.<!--QuoteEnd--></div><!--QuoteEEnd--> <br /><br />Is that referring to things like, php includes for header and footer files?<!--content-->
<!--QuoteBegin-natimage+Jan 21 2004, 10:34 PM--><div class='quotetop'>QUOTE(natimage @ Jan 21 2004, 10:34 PM)</div><div class='quotemain'><!--QuoteEBegin-->Is that referring to things like, php includes for header and footer files?<!--QuoteEnd--></div><!--QuoteEEnd--><br /> No, that's only for SSI. <br /><br />Also, I'd like to say that you don't have to use this Axxxxx syntax. You can simply write, <br /><br />ExpiresByType image/jpeg "access plus 30 days"<br /><br />or <br /><br />ExpiresByType image/jpeg "modification plus 1 year"<!--content-->
I've put the code into my .htaccess file in public_html folder. I've used a "Server header Checker" tool, but can't make heads or tails of most of it. Is there some other way of knowing whether or not my code is working?<!--content-->
nevermind...I just figured it out!!<!--content-->
 
Back
Top