Created
March 3, 2016 15:50
-
-
Save roberto-butti/7f86f4140fb07ea3173d to your computer and use it in GitHub Desktop.
.htaccess for mod_expires and mod_deflate
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
<IfModule mod_expires.c> | |
ExpiresActive on | |
# Your document html | |
ExpiresByType text/html "access plus 1 month" | |
# Media: images, video, audio | |
ExpiresByType audio/ogg "access plus 1 month" | |
ExpiresByType image/gif "access plus 1 month" | |
ExpiresByType image/jpeg "access plus 1 month" | |
ExpiresByType image/png "access plus 1 month" | |
ExpiresByType video/mp4 "access plus 1 month" | |
ExpiresByType video/ogg "access plus 1 month" | |
ExpiresByType video/webm "access plus 1 month" | |
ExpiresByType application/font-woff "access plus 1 month" | |
# CSS and JavaScript | |
ExpiresByType application/javascript "access plus 1 month" | |
ExpiresByType text/css "access plus 1 month" | |
</IfModule> | |
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment