【问题标题】:Redirect www sub-domain to main domain with the same path using IIS Rewrite使用 IIS 重写将 www 子域重定向到具有相同路径的主域
【发布时间】:2018-04-15 09:20:41
【问题描述】:

我正在使用来自这个问题的 IIS 重写规则:https://stackoverflow.com/a/39552321/8388835

但重定向在包含页面时不起作用,例如:www.example.com/somepage 应重定向到 https://example.com/somepage,它仅适用于根路径 (www.example.com -> https://example.com )。如何使它与任何指定的页面一起工作? 任何帮助将不胜感激。

【问题讨论】:

标签: c# redirect url-rewriting iis-7.5


【解决方案1】:

我能够解决这个问题。我在这个问题中找到了答案:http to https redirect - iis8.5 url rewrite 2.0 redirect rule not working

问题是因为我还有另一个 IIS 重写规则,我更改了它的顺序,现在一切正常。

【讨论】:

    猜你喜欢
    • 2016-10-07
    • 1970-01-01
    • 2014-06-27
    • 1970-01-01
    • 2016-04-03
    • 2017-04-22
    • 2018-06-02
    • 2018-06-01
    • 1970-01-01
    相关资源
    最近更新 更多