Last active
December 21, 2017 12:19
-
-
Save sepiariver/b39e93e34c3494a12c7a to your computer and use it in GitHub Desktop.
Add GZIP and caching to .htaccess
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
# Add content types for fonts | |
AddType application/x-font-ttf .ttf | |
AddType application/x-font-opentype .otf | |
AddType application/x-font-woff .woff | |
ExpiresActive On | |
ExpiresByType image/gif A2592000 | |
ExpiresByType image/jpeg A2592000 | |
ExpiresByType image/png A2592000 | |
ExpiresByType image/x-icon A2592000 | |
ExpiresByType text/css A2592000 | |
ExpiresByType application/javascript A2592000 | |
ExpiresByType application/x-font-ttf A2592000 | |
ExpiresByType application/x-font-opentype A2592000 | |
ExpiresByType application/x-font-woff A2592000 | |
BrowserMatch "MSIE" brokenvary=1 | |
BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1 | |
BrowserMatch "Opera" !brokenvary | |
SetEnvIf brokenvary 1 force-no-vary | |
# BEGIN GZIP | |
<ifmodule mod_deflate.c> | |
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript | |
</ifmodule> | |
# END GZIP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment