http转https,http跳转https,http自动跳转https,http变https,IIS7 http自动跳转到https(通过编辑Web.config实现)
http转https,http跳转https,http自动跳转https,http变https,IIS7 http自动跳转到https(通过编辑Web.config实现)
系统:Windows
功能:http跳转https
相同文章:https://www.zhuguodong.com/?id=257
用法:Web.config 放入网站根目录
1.下载安装URL重写模块:Microsoft URL Rewrite Module
2.SSL设置不要勾选(很重要)

3.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>
第二种:
<?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$" />
<add input="{HTTPS_HOST}" pattern="^(localhost)" negate="true" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="SeeOther" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
文章转载:https://www.cnblogs.com/xiaohi/p/8038042.html
本文摘自:https://www.cnblogs.com/wxbug/p/7054972.html
延伸阅读:
gost反向代理隧道,内网穿透,反向代理,隧道代理,端口转发
gost反向代理隧道,内网穿透,反向代理,隧道代理,端口转发系统:CentOS Stream,CentOS 9,Cent…

推荐一键清理CentOS系统磁盘空间,清理内存,清理缓存,清理磁盘,清理垃圾,清理硬盘,一键清理系统缓存,日记,不必要的内容,容器日记缓存,等系统缓存日记
推荐一键清理CentOS系统磁盘空间,清理内存,清理缓存,清理磁盘,清理垃圾,清理硬盘,一键清理系统缓存,日记,不必要的…

一键清理CentOS系统磁盘空间,清理缓存,清理磁盘,清理垃圾,清理内存,清理硬盘,一键清理系统缓存,日记,不必要的内容,容器日记缓存,等系统缓存日记
一键清理CentOS系统磁盘空间,清理缓存,清理磁盘,清理垃圾,清理内存,清理硬盘,一键清理系统缓存,日记,不必要的内容…

CentOS设置虚拟内存,虚拟内存设置,CentOS 7.9怎么设置虚拟内存2G,CentOS内存不足死机优化教程,虚拟内存压缩设置
CentOS设置虚拟内存,虚拟内存设置,CentOS 7.9怎么设置虚拟内存2G,CentOS内存不足死机优化教程,虚拟…

CentOS设置虚拟内存,虚拟内存设置,CentOS 7.9怎么设置虚拟内存2G
CentOS设置虚拟内存,虚拟内存设置,,CentOS 7.9怎么设置虚拟内存2G系统:CentOS Stream,Ce…





评论(0):