如何設(shè)置讓http跳轉(zhuǎn)到https
設(shè)置方法
用記事本打開web.config文件
找到<rules>
在他后面插入
<rule name="redirec 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>
這樣設(shè)置后,http的所有鏈接就會(huì)自動(dòng)跳轉(zhuǎn)到https了