虚拟主机Web.config 301 设置http跳转https
生活随笔
收集整理的這篇文章主要介紹了
虚拟主机Web.config 301 设置http跳转https
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)https://%{SERVER_NAME}/$1[R,L]
<rewrite>
<rules>
<rule name="http redirect to https" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="^OFF$" />
<add input="{HTTPS_HOST}" pattern="^(localhost)" negate="true" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" />
</rule>
</rules>
</rewrite>
總結
以上是生活随笔為你收集整理的虚拟主机Web.config 301 设置http跳转https的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 升级 iOS 14 之后,无法撤回微信消
- 下一篇: 有趣的功能:watchOS 7 增加「洗