Created
August 13, 2017 03:22
-
-
Save lukecav/4548b1b54fdd26d569a7068c7d2fb6d4 to your computer and use it in GitHub Desktop.
Cookie-less image sub-domain in Apache
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
https://wp-mix.com/htaccess-cookie-less-image-domain/