Created
April 23, 2017 23:40
-
-
Save fernandiez/0684a5bea38fb60373a5b132ef86bb21 to your computer and use it in GitHub Desktop.
Redirect 301 from HTTP to HTTPS with www
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
#Redirect 301 from HTTP to HTTPS with www | |
RewriteCond %{HTTP_HOST} !^www\. | |
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | |
RewriteCond %{HTTPS} off | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment