首页 » 操作系统 » Windows » 正文

IIS 7~10 http 转 https

发布者:站点默认
2022/06/16 浏览数(286) 分类:Windows IIS 7~10 http 转 https已关闭评论

安装Download URL Rewrite Module 2.1

/web.config

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <rewrite>
      <rules>
        <rule name="http2https" stopProcessing="true">
          <match url="(.*)" />
          <conditions>
            <add input="{HTTPS}" pattern="off" />
          </conditions>
          <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" />
        </rule>
      </rules>
    </rewrite>
  </system.webServer>
</configuration>
点击返回顶部
  1. 留言
  2. 联系方式