時間(jiān):2019-05-22 浏覽量: 收藏
web.config實現(xiàn)http重定向跳(tiào)轉HTTPS,代碼如下:
<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>
web.config重定向帶www的域名轉向www域名規則,代碼如下:
<rule name="不(bù)帶www轉向www域名規則" stopProcessing="true"> <match url="(.*)" /> <conditions logicalGrouping="MatchAll"> <add input="{HTTP_HOST}" pattern="^xmjdwx.cc$" ignoreCase="false" /> </conditions> <action type="Redirect" url="https://www.xmjdwx.cc{R:1}" redirectType="Found" /> </rule>
RELATED RECOMMEND
Copyright © 2012-2024 世敏網絡 版權所有 京ICP證000000号 閩公網安備 35020502000640号 關鍵詞聚合