【发布时间】:2017-08-29 10:30:28
【问题描述】:
我的要求很简单。我有Http://abc 需要使它成为Https://abc。我在 web.config 中添加了以下代码。即在 IIS 中添加新规则。
我已经关注了 IIS 中的 URL 重写模块。
<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}{REQUEST_URI}" redirectType="Found" />
</rule>
</rules>
</rewrite>
但它仍然对我不起作用。帮帮我。
【问题讨论】:
-
你安装了IIS重写模块吗?
-
是的。已经完成,从那里添加了新规则。该代码属于新规则本身。
标签: asp.net http https iis-8.5