Htaccess 重定向
大家好,我正在将网站迁移到具有不同 URL 结构的新 CMS,如果链接的特定部分丢失,我希望让用户重定向。因此,如果用户访问 www.domain.com/articles/name_of_article,它会将他们带到旧网站,但是如果他们访问 www.domain.com/,它会将他们转发到子目录 http://beta.domain.com 因此,我想要实现的目标是让旧 URL 保持活动状态,以免丢失旧链接的流量,因为由于旧 CMS 的编码方式,不可能迁移这些链接。但会提示用户移至新站点当他们登陆这些页面时。
如何通过 htaccess 来完成此操作,任何提示将不胜感激?
问候并感谢您的帮助!
Hey folks, I'm migrating a website over a to new CMS with a different URL structure, I'd like to have users redirect if a specific part of the link is missing. So if the user goes to www.domain.com/articles/name_of_article it'll take them to the old site, however if they go to www.domain.com/ it'll forward them to the subdirectory http://beta.domain.com
So what I'm trying to accomplish is to leave the old URLs active as to not lose traffic from old links since migrating those links is impossible because of how the old CMS was coded..but prompt the user to move over to the new site when they land on those pages.
how can this be accomplished via htaccess, any tips will be greatly appreciated?
Regards and thank you for your help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
做到了
...答案比问题简单多了哈哈
did it
...The answer was a lot simpler than the question hah