原创

IIS7如何实现访问HTTP跳转到HTTPS访问

IIS7如何实现访问HTTP跳转到HTTPS访问

IIS7如何实现访问HTTP跳转到HTTPS访问 转的
1.安装URL重写模块(默认是没有安装的)

32位的
http://download.microsoft.com/download/4/9/C/49CD28DB-4AA6-4A51-9437-AA001221F606/rewrite_x86_zh-CN.msi
64位
http://download.microsoft.com/download/4/E/7/4E7ECE9A-DF55-4F90-A354-B497072BDE0A/rewrite_x64_zh-CN.msi
 

 

复制代码
<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>
复制代码

 

再修改C:\Windows\System32\inetsrv\config、applicationHost.config

复制代码
            <site name="btot.xyz" id="19" serverAutoStart="true">
                <application path="/" applicationPool="btot.xyz">
                    <virtualDirectory path="/" physicalPath="66666666666666" />
                </application>
                <bindings>
                    <binding protocol="http" bindingInformation="*:80:btot.xyz" />
                    <binding protocol="http" bindingInformation="*:80:www.btot.xyz" />
                    <binding protocol="https" bindingInformation="*:443:btot.xyz" />
                    <binding protocol="https" bindingInformation="*:443:www.btot.xyz" />
                </bindings>
            </site>
复制代码

 

正文到此结束
该篇文章的评论功能已被站长关闭
本文目录