【问题标题】:URL Rewrite Rule: HTTP to HTTPS Not Working in IIS 8 2016 Server: ERR_INVALID_REDIRECTURL 重写规则:HTTP 到 HTTPS 在 IIS 8 2016 服务器中不起作用:ERR_INVALID_REDIRECT
【发布时间】:2019-06-26 23:37:00
【问题描述】:

我安装了 Godaddy SSL 证书。所有这些网址都可以在浏览器中使用: “park.mydomain.com”、“http://park.mydomain.com”、“https://park.mydomain.com”。前两个显示无担保,最后一个显示有担保。在绑定中,我有两个条目。一个 [https park.mydomain.com 端口 443],另一个是 [http park.mydomain.com 端口 80]。我安装了 URL 重写并从此链接添加了一条规则:here。现在,如果我输入第一个或第二个 url,浏览器会显示未找到 ERR_INVALID_REDIRECT。只有第三个 https:park.mydomain.com 有效。如果我禁用该规则,所有三个都会再次工作。怎么了 ?为什么不重定向?带有 IIS 的 2016 服务器托管在 azure 中

   <rewrite>
        <rules>
            <rule name="http_https" enabled="false" stopProcessing="true">
                <match url="(.*)" />
                <conditions>
                    <add input="{HTTPS}" pattern="^OFF$" />
                </conditions>
                <action type="Redirect" url="https://{HTTP_POST}/{R:1}" appendQueryString="false" redirectType="Permanent" />
            </rule>
        </rules>
    </rewrite>

【问题讨论】:

标签: iis-8


【解决方案1】:

重定向设置正确。问题出在我安装的证书类型上,仅适用于一个域。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-08-10
    • 2015-08-12
    • 1970-01-01
    • 2012-10-13
    • 2022-08-12
    • 2016-03-20
    • 1970-01-01
    • 2012-05-29
    相关资源
    最近更新 更多