Last active
July 14, 2016 08:11
-
-
Save leonkorteweg/c7cf26f9f81921bf6e4d9868ca8f0769 to your computer and use it in GitHub Desktop.
common .htaccess redirects
This file contains hidden or 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
# HTTP to HTTPS | |
RewriteEngine On | |
RewriteCond %{HTTPS} !=on | |
RewriteRule ^(.*) https://www.yoursite.com/$1 [R=301,L] | |
# HTTPS to HTTP | |
RewriteEngine On | |
RewriteCond %{HTTPS} =on | |
RewriteRule ^(.*) http://www.yoursite.com/$1 [R=301,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment