https to http without one specific domain
2 posts
• Page 1 of 1
https to http without one specific domain
Hi,
We are using ISAPI_Rewrite to change Https to Http, and the code:
#Redirect HTTPS to non-HTTPS
RewriteCond %{HTTP:Host} (.*)
RewriteCond %{HTTPS} on
RewriteCond %{REQUEST_URI} (.*)
RewriteRule .? http://%1%2 [R=301,L]
which works fine.
However, we want except one specific domain, like test.domain.com.
Rest of all https://*.domain.com should still be changed to http://*.domain.com
How should we modify the code.
Thank you and regards!
Yeming
We are using ISAPI_Rewrite to change Https to Http, and the code:
#Redirect HTTPS to non-HTTPS
RewriteCond %{HTTP:Host} (.*)
RewriteCond %{HTTPS} on
RewriteCond %{REQUEST_URI} (.*)
RewriteRule .? http://%1%2 [R=301,L]
which works fine.
However, we want except one specific domain, like test.domain.com.
Rest of all https://*.domain.com should still be changed to http://*.domain.com
How should we modify the code.
Thank you and regards!
Yeming
Re: https to http without one specific domain
Hello.
Try this rule:
Try this rule:
- Code: Select all
RewriteCond %{HTTP:Host} (?!test\.)(.*) [NC]
RewriteCond %{HTTPS} on [NC]
RewriteCond %{REQUEST_URI} (.*)
RewriteRule .? http://%1%2 [R=301,L]
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 16 guests