【发布时间】:2022-01-10 19:01:44
【问题描述】:
这一切都发生在
RedirectPermanent / https://www.example.com/
将所有http请求重定向到https。我也有旧的传入损坏的“http://...”链接,我想重定向这些链接,这似乎是执行它们的最佳位置,而不是在 https 端,这将涉及将无意义的重定向发送到非- 找到 https 页面。
如果我像这样堆叠重定向:
RedirectPermanent /specific/2020/url1.php https://example.com/2021/url1.html
RedirectPermanent /specific/2020/url2.php https://example.com/2021/url2.html
RedirectPermanent /specific/2020/url2.php https://example.com/2021/url3.html
RedirectPermanent / https://example.com/
“url#”重定向和“/”重定向之间是否存在冲突的可能性?
我在 Apache 的文档中找不到任何内容来解释这些规则将如何组合解释。 “url1”的模式匹配是否以例如“L”标志与 RewriteRule 的方式终止脚本?
或者是否有可能应用“/”-> https 行,因为它也匹配?
【问题讨论】:
标签: apache configuration url-rewriting virtualhost