PageAdmin网站内容管理系统(CMS)交流论坛

注册

 

QQ登录

只需一步,快速开始

发新话题 回复该主题

SSL证书没有跳转 [复制链接]

1#
用阿里云的主机、主机上已经安装好ssl证书、但是打开网站都没有办法直接跳转到HTTPS、请问如何在程序上添加跳转?
分享 转发
TOP
2#

打开web添加一下代码
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
        <rewrite>
            <rules>
               <rule name="301" stopProcessing="true">
                    <match url="^(.*)$" ignoreCase="false" ></match>
                    <conditions logicalGrouping="MatchAll">                      
                         <add input="{HTTP_FROM_HTTPS}" pattern="^on$" negate="true" ></add>  
                  </conditions>
                    <action type="Redirect" url="https://www.zjmidea.com/{R:1}" redirectType="Permanent" ></action>
               </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>
TOP
发新话题 回复该主题