我已经使用了很多论坛和官方IIS,ASP.Net一个关于如何在IIS8.5上启用简单http到https重定向的Microsoft网站示例,但无论出现什么是循环错误,我都会得到。
我的网站在设置的IP地址和端口80上绑定了http://subdomain.domain.com,并且在IIS的同一网站上有另一个绑定到https://subdomain.domain.com的设置IP到443
然后我使用网站web.config上的URL Rewrite模块设置此规则。
<rewrite>
<rules>
<rule name="http to https" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="^OFF$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" />
</rule>
</rules>
</rewrite>
如果我尝试点击网站的http版本,它似乎会重定向,但最终会陷入循环并失败。
我做错了什么?代码没有处理其他重定向。我需要提供更多信息吗?
答案 0 :(得分:0)
好吧,毕竟,罪魁祸首似乎是我们的Web应用程序防火墙以及它如何管理转发到DMZ服务器。