产品使用及交流论坛

首页 » 产品使用交流区 » 安装及使用交流 » SSL证书没有跳转
cdsgenergy - 2021/9/24 14:56:39
用阿里云的主机、主机上已经安装好ssl证书、但是打开网站都没有办法直接跳转到HTTPS、请问如何在程序上添加跳转?
xiyou - 2021/9/24 14:58:49
打开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>
1
查看完整版本: SSL证书没有跳转