Created
December 11, 2015 17:39
-
-
Save samnabi/419c1ecbe7ef75a869b2 to your computer and use it in GitHub Desktop.
Shopzest rewrite rules
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
RewriteEngine On | |
RewriteBase / | |
# http://shopzest.com => https://shopzest.com | |
RewriteCond %{HTTPS} off | |
RewriteCond %{HTTP_HOST} ^shopzest\.com | |
RewriteRule ^(.*)$ https://shopzest.com/$1 [R=301,L] | |
# http://www.shopzest.com => https://shopzest.com | |
# https://www.shopzest.com => https://shopzest.com | |
RewriteCond %{HTTP_HOST} ^www\.shopzest\.com | |
RewriteRule ^(.*)$ https://shopzest.com/$1 [R=301,L] | |
# https://subdomain.shopzest.com => http://subdomain.shopzest.com | |
RewriteCond %{HTTPS} on | |
RewriteCond %{HTTP_HOST} !^www\. | |
RewriteCond %{HTTP_HOST} ^(.+)\.shopzest\.com | |
RewriteRule ^(.*)$ http://%1.shopzest.com/$1 [R=301,L] | |
# https://www.subdomain.shopzest.com => http://subdomain.shopzest.com | |
# http://www.subdomain.shopzest.com => http://subdomain.shopzest.com | |
RewriteCond %{HTTP_HOST} ^www\.(.+)\.shopzest\.com | |
RewriteRule ^(.*)$ http://%1.shopzest.com/$1 [R=301,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment