super over simplified cache control and expire header htaccess


/ Published in: Apache
Save to your folder(s)

long htaccess expired header for all files except for server side scripts


Copy this code and paste it in your HTML
  1. ExpiresActive On
  2. ExpiresDefault A6048000
  3. FileETag none
  4. Header unset Etag
  5. Header unset Last-Modified
  6. Header set Cache-Control "public"
  7.  
  8. <FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi|html?)$">
  9. Header set Cache-Control "private, must-revalidate, proxy-revalidate"
  10. ExpiresDefault A0
  11. ExpiresActive Off
  12. </FilesMatch>

URL: http://wiki.dennyhalim.com/htaccess

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.