Posted By

odenijs on 10/07/10


Tagged

htaccess apache expiresbytype expiresdefault


Versions (?)

Set content expiration in htaccess


 / Published in: Apache
 

  1. # turn on the module for this directory
  2.  
  3. ExpiresActive on
  4.  
  5. # set default
  6.  
  7. ExpiresDefault "access plus 24 hours"
  8.  
  9. ExpiresByType image/jpg "access plus 1 months"
  10.  
  11. ExpiresByType image/gif "access plus 1 months"
  12.  
  13. ExpiresByType image/jpeg "access plus 1 months"
  14.  
  15. ExpiresByType image/png "access plus 1 months"
  16.  
  17. ExpiresByType text/css "access plus 1 months"
  18.  
  19. ExpiresByType text/javascript "access plus 1 months"
  20.  
  21. ExpiresByType application/javascript "access plus 1 months"
  22.  
  23. ExpiresByType application/x-shockwave-flash "access plus 1 months"

Report this snippet  

You need to login to post a comment.