发布:2021/9/26 17:21:24作者:管理员 来源:本站 浏览次数:1409
亲测可用
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="没有加www的自动重定向到加www的域名下301Redirect" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAny">
<add input="{HTTP_HOST}" pattern="^zybw.com$" />
</conditions>
<action type="Redirect" url="https://www.zybw.com/{R:0}" redirectType="Permanent" />
</rule>
<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>
© Copyright 2014 - 2025 柏港建站平台 ejk5.com. 渝ICP备16000791号-4