Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <FilesMatch "^(seal.jpg)$">
- ExpiresActive on
- ExpiresDefault "access plus 1 month"
- </FilesMatch>
- ## EXPIRES CACHING ##
- <IfModule mod_expires.c>
- ExpiresActive on
- ExpiresByType image/jpg "access 1 year"
- ExpiresByType image/jpeg "access 1 year"
- ExpiresByType image/gif "access 1 year"
- ExpiresByType image/png "access 1 year"
- ExpiresByType text/css "access 1 month"
- ExpiresByType text/x-javascript "access 1 month"
- ExpiresByType application/x-javascript "access 1 month"
- ExpiresByType application/pdf "access 1 month"
- ExpiresByType application/x-shockwave-flash "access 1 month"
- ExpiresByType image/x-icon "access 1 year"
- ExpiresDefault "access 2 days"
- </IfModule>
- ## EXPIRES CACHING ##
- #THIS IS WRITTEN TO WORK IN YOUR .HTACCESS FILE
- #THIS IS WHAT I GOT TO WORK ON APACHE 2.2 ON 102317 AT GODADDY.COM
- #PLACED IN YOUR ROOT .HTACCESS THIS APPLYS TO EVERY FILE NAMED SEAL.JPG.
- #IF YOU HAVE MANY SEAL.JPG AND YOU WANT IT TO
- #APPLY TO JUST ONE PUT THIS IN THE .HTACCESS FILE IN THE DIRECTORY WHERE
- #THE SEAL.JPG FILE IS
- <IfModule mod_expires.c>
- ExpiresActive On
- ExpiresByType image/jpg "access plus 1 month"
- <FilesMatch "^seal.jpg$">
- ExpiresByType image/jpg "access plus 12 hours"
- </FilesMatch>
- </IfModule>
- #FilesMatch must come after ExpiresByType image/jpg "access plus 1 month"
- #Douglas' answer set me on the right track. THANKS!
- #keywords: how to set Expires HTTP headers on a file named X.
- #change the cache of one file. cache only one file. how to cache one file.
- #I don't want to cache by type Web server
Add Comment
Please, Sign In to add comment