繁体   English   中英

使用IIS Rewrite将www子域重定向到具有相同路径的主域

[英]Redirect www sub-domain to main domain with the same path using IIS Rewrite

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

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

我能够解决此问题。 我在以下问题中找到了答案: http至https重定向-iis8.5 url重写2.0重定向规则不起作用

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM