Created
March 29, 2016 04:08
-
-
Save hsleonis/ae92d63b2d98474db1d0 to your computer and use it in GitHub Desktop.
HTAccess file with ETag, Cache, GZip and custom routing
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_deflate.c> | |
| AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/css text/javascript application/javascript application/x-javascript application/json | |
| </ifModule> | |
| Header unset ETag | |
| FileETag None | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine on | |
| RewriteCond %{REQUEST_FILENAME} -s [OR] | |
| RewriteCond %{REQUEST_FILENAME} -l [OR] | |
| RewriteCond %{REQUEST_FILENAME} -d | |
| RewriteRule ^.*$ - [NC,L] | |
| RewriteRule ^(.*) index.html [NC,L] | |
| </IfModule> | |
| <IfModule mod_expires.c> | |
| ExpiresActive On | |
| ExpiresByType image/jpg "access 1 year" | |
| ExpiresByType image/jpeg "access 1 year" | |
| ExpiresByType image/gif "access 1 year" | |
| ExpiresByType image/png "access 1 year" | |
| ExpiresByType text/css "access 1 month" | |
| ExpiresByType application/pdf "access 1 month" | |
| ExpiresByType text/x-javascript "access 1 month" | |
| ExpiresByType application/x-javascript "access 1 month" | |
| ExpiresByType text/json "access 1 month" | |
| ExpiresByType text/javascript "access 1 month" | |
| ExpiresByType application/json "access 1 month" | |
| ExpiresByType application/x-shockwave-flash "access 1 month" | |
| ExpiresByType image/x-icon "access 1 year" | |
| ExpiresDefault "access 1 year" | |
| </IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment