Created
July 19, 2019 16:59
-
-
Save simbus82/9d0e6f80866bf2f8f366d77d47b4ba73 to your computer and use it in GitHub Desktop.
.htaccess for cookie-less image domain
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AddDefaultCharset UTF-8 | |
ServerSignature Off | |
Options -Indexes | |
FileETag none | |
<IfModule mod_headers.c> | |
Header unset ETag | |
Header unset Cookie | |
Header unset Set-Cookie | |
</IfModule> | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
</IfModule> | |
<IfModule mod_expires.c> | |
ExpiresActive on | |
</IfModule> | |
<FilesMatch "\.(ico|jpg|jpeg|jpe|png|gif)$"> | |
ExpiresDefault "access plus 2 years" | |
</FilesMatch> | |
<IfModule mod_expires.c> | |
ExpiresByType image/x-icon "access plus 2 years" | |
ExpiresByType image/ico "access plus 2 years" | |
ExpiresByType image/gif "access plus 2 years" | |
ExpiresByType image/jpg "access plus 2 years" | |
ExpiresByType image/jpe "access plus 2 years" | |
ExpiresByType image/jpeg "access plus 2 years" | |
ExpiresByType image/png "access plus 2 years" | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment