0
<rule name="rd" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTP_HOST}" pattern="^test\.com$" negate="true" />
<add input="{HTTP_HOST}" pattern="^www.\test\.net$" negate="true" />
</conditions>
<action type="Redirect" url="https://test.com/{R:0}" redirectType="Permanent" />
</rule>
此代码的工作WWW:重定向HTTPS WWW到https非在IIS
http://www.test.com => https://test.com
http://www.test.net=> https://test.com
但不工作时,网址为:
https://www.test.com => https://test.com
https://www.test.net => https://test.com
有什么问题?
感谢FOT帮助
如果你的条件之一是' ',它为什么会起作用? –
haim770
当url已经使用HTTPS时,整个规则根本就不适用 – haim770
我写错了,编辑过的帖子 – Ali