Created
July 13, 2011 13:50
-
-
Save pkdavies/1080324 to your computer and use it in GitHub Desktop.
Apache optimisation for Magento
This file contains hidden or 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
FileETag none | |
<IfModule mod_expires.c> | |
ExpiresActive on | |
ExpiresDefault "access plus 1 month" | |
ExpiresByType text/html "access" | |
ExpiresByType text/xml "access plus 60 minutes" | |
ExpiresByType text/css "access plus 1 month" | |
ExpiresByType text/plain "access plus 1 month" | |
ExpiresByType text/javascript "access plus 1 month" | |
ExpiresByType application/x-javascript "access plus 1 month" | |
ExpiresByType application/javascript "access plus 1 month" | |
ExpiresByType application/x-shockwave-flash "access plus 1 month" | |
ExpiresByType application/pdf "access plus 1 month" | |
ExpiresByType image/gif "access plus 1 month" | |
ExpiresByType image/png "access plus 1 month" | |
ExpiresByType image/jpg "access plus 1 month" | |
ExpiresByType image/jpeg "access plus 1 month" | |
ExpiresByType image/x-icon "access plus 1 month" | |
ExpiresByType video/x-flv "access plus 1 month" | |
ExpiresByType video/quicktime "access plus 1 month" | |
</IfModule> | |
<IfModule mod_deflate.c> | |
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/xml application/javascript | |
BrowserMatch ^Mozilla/4 gzip-only-text/html | |
BrowserMatch ^Mozilla/4\.0[678] no-gzip | |
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html | |
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary | |
Header append Vary User-Agent env=!dont-vary | |
</IfModule> | |
<IfModule mod_headers.c> | |
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$"> | |
Header set Cache-Control "max-age=2629743, public" | |
</FilesMatch> | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment