云主机(虚拟主机)Windows系统 IIS7环境
云服务器:【直接在IIS上部署的SSL】在对应站点根目录下新建(通过ftp或登录后直接进入到D:\wwwroot\站点ftp命名目录\wwwroot创建)一个文件命名为web.config并编辑添加以下规则
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="301" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTPS}" pattern="^on$" negate="true" />
</conditions>
<action type="Redirect" url="https://www.abc.com/{R:1}" redirectType="Permanent" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
#注意更改为自己的域名






