参考:http://www.cnblogs.com/tielemao/p/6386362.html

webconfig中增加:

<configuration>

<system.webServer>

<defaultDocument>
<files>
<clear />
<add value="default.aspx" />
<add value="Login.aspx" />
<add value="index.htm" />
<add value="index.html" />
</files>
</defaultDocument>
<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>
</configuration>

posted on 2017-07-17 10:16  慕凡尘  阅读(397)  评论(0编辑  收藏  举报