Last active
February 1, 2016 20:04
-
-
Save j26design/60c649a5efd7cf1ca6e2 to your computer and use it in GitHub Desktop.
Redirect specific domain to or away from 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
# Redirect to https | |
RewriteCond %{HTTPS} off | |
RewriteCond %{HTTP_HOST} example\.com$ [NC] | |
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L,NE] | |
# Redirect to http | |
RewriteCond %{HTTPS} on | |
RewriteCond %{HTTP_HOST} example\.com$ [NC] | |
RewriteRule ^ http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L,NE] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment