【问题标题】:Https redirection changes to wrong url pathHttps 重定向更改为错误的 url 路径
【发布时间】:2022-01-03 19:14:13
【问题描述】:

我一直在尝试使用重写模块将我的 http 网络链接转换为 https。 重定向似乎部分起作用,因为链接是使用 https 转换的,但目标 url 与预期不符。

即原始url:http://servername/folder/page_x.aspx 但转换后的 url 会从路径中删除“文件夹”::https://servername/page_x.aspx

非常感谢任何有关修复的帮助或指导!

【问题讨论】:

    标签: html asp.net web-config http-redirect url-rewrite-module


    【解决方案1】:

    这可能是因为它强制使用默认模式,如果你没有在这里指定一个:

    <conditions>
    <add input="{HTTPS}" pattern="off" />
    </conditions>
    

    这可能是由于重定向类型,例如下面的示例:

    <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" />
    

    【讨论】:

    • 非常感谢,是的,默认是罪魁祸首。
    猜你喜欢
    • 1970-01-01
    • 2017-01-20
    • 2017-09-10
    • 2021-10-19
    • 1970-01-01
    • 2013-07-08
    • 1970-01-01
    • 1970-01-01
    • 2011-12-07
    相关资源
    最近更新 更多