Created
May 18, 2018 19:21
-
-
Save ng-chicago/8eeb71f749134983a83b8752a9a29905 to your computer and use it in GitHub Desktop.
This file contains 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_rewrite.c> | |
# Redirect all insecure requests | |
RewriteCond %{HTTPS} !=on | |
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R=301,L] | |
</IfModule> | |
<ifmodule mod_deflate.c> | |
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript text/javascript | |
</ifmodule> | |
# tell web browsers not to even try HTTP on this domain for the next year | |
# uncomment this only after you've confirmed your site is working on HTTPS, since it commits you to providing it over HTTPS | |
Header set Strict-Transport-Security "max-age=31536000" env=HTTPS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment