Last active
November 10, 2016 22:56
-
-
Save luissquall/f1ef23545955fec35b89 to your computer and use it in GitHub Desktop.
Redirect HTTP traffic to HTTPS
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} on | |
RewriteCond %{HTTP_HOST} ^www\. | |
RewriteRule ^(.*)$ https://domain.com/$1 [R=301,L] | |
RewriteCond %{HTTPS} off | |
RewriteRule ^(.*)$ https://domain.com/$1 [R=301,L] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment