网站整站301跳转到https的方法:
在网站根目录修改web.config的配置文件,例如:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="301" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAny">
<add input="{HTTP_HOST}" pattern="^abc\.cn$" />
</conditions>
<action type="Redirect" url="https://www.abc.cn/{R:0}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>