Last active
January 28, 2019 13:41
-
-
Save WebVooruit/ee29274a06fdc0ea115ea906ade0e446 to your computer and use it in GitHub Desktop.
.htaccess HTTPS + HSTS
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> | |
RewriteEngine On | |
RewriteCond %{HTTPS} off | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | |
</IfModule> | |
<IfModule mod_headers.c> | |
Header set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" env=HTTPS | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment