http帶www的跳轉https帶www

lingang 2021-5-31 1452

你好, 有沒有什么辦法 http://www.abc.com/ 跳轉到https://www.abc.com  現(xiàn)在網(wǎng)站都跳轉https唯獨 http帶www 的不跳轉https

最新回復 (3)
  • 6258 2021-5-31
    引用 2
    你好,建議使用IIS自帶的URLrewrite功能,在需要設置強制跳轉的網(wǎng)站根目錄下,新建一個文件命名為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>
  • 6258 2021-5-31
    引用 3
    經(jīng)檢查您的服務器是2008系統(tǒng),該系統(tǒng)只支持一張SSL證書,已經(jīng)被另外個網(wǎng)站綁定。因此跳轉會失敗。
    建議更換為2012系統(tǒng)
  • lingang 2021-5-31
    引用 4
    好的,謝謝
返回
發(fā)新帖