【发布时间】:2021-01-13 16:06:33
【问题描述】:
我需要实现 2 个重定向。
我想将example.com/subdir 重定向到 example1.com/subdir
然后我想将 example.com/ 上剩余的所有内容重定向到 example2.com/index.html
我尝试了以下方法,但没有找到我的解决方案:
redirect 301 /subdir https://example1.com/subdir
redirect 301 / https://example2.com/index.html
最终发生的一切都是重定向到https://example2.com/index.html
谢谢!
附加
我需要https://example.com/subdir 重定向到https://outlook.office365.com/owa/calendar/
然后,https://example.com 上的所有内容/其他任何内容都需要重定向到 example1.com 上的新站点
换句话说,example.com 上的所有内容都需要重定向到 example1.com/index.html 处的新压缩页面,但 example.com/subdir 需要转到 Outlook/office 365。
【问题讨论】:
标签: apache .htaccess redirect mod-rewrite friendly-url