vultr优惠码,vultr云服务器,vultr优惠,vultr教程,vultr购买,香港主机,香港VPS,香港服务器,服务推荐,国外VPS推荐

IIS 301重定向http自动转向https

网络技术 baishitou 1447℃

IIS 301重定向http自动转向https

web.config代码:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<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>

 

喜欢 (2)or分享 (0)