http转https实战教程iis7.5
2021年5月17日
在system.webServer 节点下
<rewrite>
<rules>
<rule name=”Redirect to https” stopProcessing=”true”>
<match url=”(.*)” />
<conditions>
<add input=”{HTTPS}” pattern=”^OFF$” />
<add input=”{HTTPS_HOST}” pattern=”^(localhost)” negate=”true” />
</conditions>
<action type=”Redirect” url=”https://{HTTP_HOST}:443/{R:1}” redirectType=”SeeOther” />
</rule>
</rules>
</rewrite>
完成以上,我们的http转https就成功了