【问题标题】:Godaddy URL Rewrite HTTP to HTTPS won't work Plesk [closed]Godaddy URL 将 HTTP 重写为 HTTPS 不起作用 Plesk [关闭]
【发布时间】:2018-05-20 13:46:28
【问题描述】:

首先,我查看了有关 stackoverflow 的所有解决方案,并在谷歌上搜索了这个问题,甚至寻求了 Godaddy 支持(缺乏支持)

我正在使用 windows (plesk) 在 Godaddy 上。我的网站是用 C# mvc 编写的。我设置了我的 SSL 证书,我可以通过 https 访问该站点。当我尝试通过 http 访问时,它不会重定向,而是给我一个 403.4 错误。 我尝试了按照 Godaddy 帮助部分建议的 URL 重写 https://www.godaddy.com/help/redirect-http-to-https-automatically-8828

我什至复制了我们在我们自己的服务器上的一个生产站点上使用的 URL 重写。

    <rewrite>
        <rules>
            <rule name="Remove www" stopProcessing="true">
                <match url="(.*)" />
                <conditions>
                    <add input="{HTTP_HOST}" pattern="^www\.(.+)$" />
                </conditions>
                <action type="Redirect" url="http://{C:1}/{R:0}" />
            </rule>
            <rule name="Redirect to HTTPS" stopProcessing="true">
                <match url="(.*)" />
                <conditions>
                    <add input="{HTTPS}" pattern="^OFF$" />
                </conditions>
                <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="SeeOther" />
            </rule>
        </rules>
    </rewrite>

这些似乎都不起作用,godaddy 将其归咎于证书没有被传播,但如果是这种情况,那么 HTTPS 应该不起作用,我不应该得到 403.4 错误,而是充其量是其他一些相关错误.

需要在 Godaddy 服务器上启用 SSL

【问题讨论】:

    标签: asp.net-mvc https url-rewriting http-status-code-403


    【解决方案1】:

    我通过取消选中“需要 SSL”解决了这个问题,现在它重定向了。

    【讨论】:

      猜你喜欢
      • 2013-01-27
      • 2019-05-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-09-20
      • 2011-06-02
      • 2018-04-17
      • 2012-06-07
      相关资源
      最近更新 更多