【发布时间】:2012-07-23 08:53:55
【问题描述】:
我的 web.config 文件中有这个:
<system.webServer>
<rewrite>
<rules>
<rule name="HTTP to HTTPS redirect" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
我检查了该规则是否已添加到 IIS 管理器中,但它似乎不起作用。我已经关闭了要求 SSL。
因此,如果我访问 webvts.mprin.com 或 http://webvts.mprinc.com,我会收到 404 not found 错误。但如果我去https://webvts.mprinc.com,一切正常。
【问题讨论】:
标签: iis redirect iis-7 web-config rewrite