【发布时间】:2017-02-04 21:56:40
【问题描述】:
我有一个同时支持 HTTP 和 HTTPS(具有有效证书)的网站,但不幸的是,由于某些外部服务的内部问题,HTTPS 配置尚未准备好投入生产。
我现在想通过 IIS(web.config 文件)将每个 https 请求重定向到 http。
我在官方文档中找到了从 http 重定向到 https 的代码,但不是相反的。所以我尝试转换它,但 IIS 实际上并没有重定向:
<rule name="Redirect to HTTP" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTP}" pattern="^OFF$" />
</conditions>
<action type="Redirect" url="http://{HTTP_HOST}/{R:1}" redirectType="Permanent" />
</rule>
【问题讨论】:
标签: http azure redirect iis https