【问题标题】:IIS web URL redirect to subfolder over http to https different portIIS Web URL 通过 http 重定向到子文件夹到 https 不同的端口
【发布时间】:2021-03-11 06:39:21
【问题描述】:

我在我的服务器中使用 IIS 7.5 作为网络服务器。 请求您支持从 HTTP 到 HTTPS 的 URL 重定向。 我的 HTTP 服务在 80 端口上运行,HTTPS 在 4545 端口上运行。由于端口更改出现问题。

还请帮我从根文件夹重定向到 4545 端口上的子文件夹。

【问题讨论】:

  • 您好,问题解决了吗?如果您认为我的回复对您有帮助,您可以将其标记为答案。

标签: asp.net web-applications webserver iis-7.5


【解决方案1】:

您可以使用此 URL 重写规则:

    <rewrite>
            <rules>
                <rule name="HTTPS Redirect" stopProcessing="true">
                    <match url="(.*)" />
                    <conditions>
                        <add input="{HTTPS}" pattern="^OFF$" />
                    </conditions>
                    <action type="Redirect" url="https://localhost:4545/..." appendQueryString="false" />
                </rule>
            </rules>
        </rewrite>

此规则的URL部分需要自己修改。

【讨论】:

    猜你喜欢
    • 2018-12-06
    • 2017-06-29
    • 2017-06-01
    • 1970-01-01
    • 2021-10-21
    • 2016-02-26
    • 2013-06-11
    • 2011-10-01
    相关资源
    最近更新 更多