Last active
June 22, 2017 15:44
-
-
Save LoyEgor/209a904b4a87b068bd9104b128e23bc7 to your computer and use it in GitHub Desktop.
basic .htaccess (www redirect, gzip, 7 day changes)
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
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css application/x-javascript | |
BrowserMatch ^Mozilla/4 gzip-only-text/html | |
BrowserMatch ^Mozilla/4.0[678] no-gzip | |
BrowserMatch bMSIE !no-gzip !gzip-only-text/html | |
FileETag MTime Size | |
<ifmodule mod_expires.c> | |
<filesmatch ".(jpg|gif|png|css|js|swf|svg|woff|woff2|ttf|eot)$"> | |
ExpiresActive on | |
ExpiresDefault "access plus 7 day" | |
</filesmatch> | |
</ifmodule> | |
<IfModule mod_headers.c> | |
<FilesMatch ".(js|css)$"> | |
Header append Vary Accept-Encoding | |
</FilesMatch> | |
</IfModule> | |
Options +FollowSymLinks | |
RewriteEngine On | |
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC] | |
RewriteRule ^(.*)$ http://%1/$1 [R=301,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment