10秒后自動(dòng)關(guān)閉
主機(jī)大師設(shè)置http自動(dòng)跳轉(zhuǎn)https的方法

使用IIS自帶的URLrewrite功能,在需要設(shè)置強(qiáng)制跳轉(zhuǎn)的網(wǎng)站根目錄下,新建一個(gè)文件命名為web.config,使用記事本打開(kāi)編輯。

添加如下代碼后保存:

<?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>


用戶留言
游客[39.129.*.*](2020-6-11 17:25:17)
你好,請(qǐng)問(wèn)使用了阿帕奇大師的怎么設(shè)置http跳轉(zhuǎn)https
[2020-6-11 18:10:05]請(qǐng)參考:http://www.12n9.com/help/apachemaster/1829.html