【发布时间】:2016-11-05 00:41:56
【问题描述】:
我有两个域(例如 domainone.com 和 domaintwo.com),它们指向一个网站。 我有一个 domainone.com 的 ssl 证书。
我想为 domainone.com 自动重定向到 https。 我不想为 domaintwo.com 自动重定向到 https,因为我没有此 domaintwo.com 的 ssl 证书。我只想用http打开它。
url rewrite (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。请帮助我如何仅针对 domainone.com 自动重定向到 https。
谢谢。
【问题讨论】:
标签: https url-rewriting iis-7.5