RewriteEngine on #redirect http non-www to https://www RewriteCond %{HTTPS} off RewriteCond %{HTTP_HOST} ^(www.)?example.com$ RewriteRule (.) https://www.example.com/$1 [R=301,L] #redirect https non-www to www RewriteCond %{HTTPS} on RewriteCond %{HTTP_HOST} ^example.com$ RewriteRule (.) https://www.example.com/$1 [R=301,L]
Created
January 31, 2018 21:00
-
-
Save ericrasch/13867159799f73de0148811e6ada43fc to your computer and use it in GitHub Desktop.
redirect http non-www to https
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment