活动:一次性充值满500元,云服务器、虚拟主机产品8折特惠! 全国免费咨询热线:℡ 400-9918-136
帮助和公告

感谢您的关注,我们一直致力于为您提供放心、满意的服务。

优惠活动香港云服务器,免备案在线开通,预装宝塔(bt)面板,独享10M带宽,赠送DDOS防护,免费技术支持,代理低至6折,仅需48元/月!
返回首页

https301跳转重定向到http的方法

信息来源:亿速互联修改时间:2022/9/20 16:59:40

http重定向跳转到https比较简单,https重定向到http相关资料较少,以下方法适用于IIS架构的服务器,将代码另存为web.config后保存到网站根目录即可生效。


<?xml version="1.0" encoding="UTF-8"?>

 <configuration>

 <system.webServer>

 <rewrite>

 <rules> 

<rule name="Redirect to HTTP" stopProcessing="true">

   <match url="(.*)" />

     <conditions>

       <add input="{HTTPS}" pattern="^ON$" />

     </conditions>

     <action type="Redirect" url="http://{HTTP_HOST}/{R:1}" redirectType="Permanent" />

 </rule>

</rules>

</rewrite>

 </system.webServer>

 </configuration>


注意以上代码是https跳转到http。

以下为最近更新的内容