Guest User

Untitled

a guest
Oct 23rd, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. <FilesMatch "^(seal.jpg)$">
  2. ExpiresActive on
  3. ExpiresDefault "access plus 1 month"
  4. </FilesMatch>
  5.  
  6. ## EXPIRES CACHING ##
  7. <IfModule mod_expires.c>
  8. ExpiresActive on
  9. ExpiresByType image/jpg "access 1 year"
  10. ExpiresByType image/jpeg "access 1 year"
  11. ExpiresByType image/gif "access 1 year"
  12. ExpiresByType image/png "access 1 year"
  13. ExpiresByType text/css "access 1 month"
  14. ExpiresByType text/x-javascript "access 1 month"
  15. ExpiresByType application/x-javascript "access 1 month"
  16. ExpiresByType application/pdf "access 1 month"
  17. ExpiresByType application/x-shockwave-flash "access 1 month"
  18. ExpiresByType image/x-icon "access 1 year"
  19. ExpiresDefault "access 2 days"
  20. </IfModule>
  21. ## EXPIRES CACHING ##
  22.  
  23. #THIS IS WRITTEN TO WORK IN YOUR .HTACCESS FILE
  24. #THIS IS WHAT I GOT TO WORK ON APACHE 2.2 ON 102317 AT GODADDY.COM
  25. #PLACED IN YOUR ROOT .HTACCESS THIS APPLYS TO EVERY FILE NAMED SEAL.JPG.
  26. #IF YOU HAVE MANY SEAL.JPG AND YOU WANT IT TO
  27. #APPLY TO JUST ONE PUT THIS IN THE .HTACCESS FILE IN THE DIRECTORY WHERE
  28. #THE SEAL.JPG FILE IS
  29. <IfModule mod_expires.c>
  30. ExpiresActive On
  31. ExpiresByType image/jpg "access plus 1 month"
  32. <FilesMatch "^seal.jpg$">
  33. ExpiresByType image/jpg "access plus 12 hours"
  34. </FilesMatch>
  35. </IfModule>
  36.  
  37. #FilesMatch must come after ExpiresByType image/jpg "access plus 1 month"
  38. #Douglas' answer set me on the right track. THANKS!
  39. #keywords: how to set Expires HTTP headers on a file named X.
  40. #change the cache of one file. cache only one file. how to cache one file.
  41. #I don't want to cache by type Web server
Add Comment
Please, Sign In to add comment