我有两个域名(例如domainone.com和domaintwo.com),它们指向一个网站。我有一个用于domainone.com的ssl证书。
我想为domainone.com自动重定向到https。我不想做自动重定向到domaintwo.com的https,因为我没有这个domaintwo.com的SSL证书。我只想用http打开它。
url重写(IIS)中的规则如下。
Match URL – Requested URL: Matches the Pattern
Match URL – Using: Regular Expression
Pattern: (.*)
Condition Input: {HTTPS}
Check if input string: Matches the Pattern
Pattern: ^OFF$
Action type: Redirect
Redirect URL: https://{HTTP_HOST}/{R:1}
Redirect type: See Other (303)现在,这两个域名都会自动重定向到https。请帮助我如何做,以自动重定向到https只有domainone.com。
谢谢。
发布于 2016-11-05 00:41:57
我加了一个条件。现在它可以像我想要的那样工作了。
Match URL – Requested URL: Matches the Pattern
Match URL – Using: Regular Expression
Pattern: (.*)
Condition Input: {HTTPS}
Check if input string: Matches the Pattern
Pattern: ^OFF$
Condition Input: {HTTP_HOST}
Check if input string: Matches the Pattern
Pattern: domainone.com
Action type: Redirect
Redirect URL: https://{HTTP_HOST}/{R:1}
Redirect type: See Other (303)https://stackoverflow.com/questions/40418064
复制相似问题