iis net 2.0经典模式下配置文件 配置好后 网址可自动跳转到https
<rewrite>标签的内容放入<system.webServer> 没有的话直接复制 <system.webServer>标签下所有内容到配置文件就行
1.http跳转对应网址的https
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Redirect to HTTPS" 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>
2.http和https跳转到www网址
<rewrite>
<rules>
<rule name="WWW Redirect" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^s.wbsun.com$" />
</conditions>
<action type="Redirect" url="https://s.wbsun.com/{R:0}" redirectType="Permanent" />
</rule>
</rules>
© 版权声明
文章版权归作者所有,转载请预留文章地址。s.wbsun.net
THE END
暂无评论内容