通过 .htaccess 重定向更改的站点位置的正确方法
我曾经将我的网站托管在 www.mysite.com/here 现在网址只是 www.mysite.com
那么我如何正确重定向来自 www.mysite.com/here/about 的所有旧链接 访问 www.mysite.com/about
谢谢。
i used to host my site at www.mysite.com/here
now the url is simply www.mysite.com
so how do i properly redirect all old links from say www.mysite.com/here/about
to www.mysite.com/about
thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
添加
到您的 .htaccess 中,以便重写规则看起来类似于
如果您的 Drupal 实例(例如页面)中碰巧有另一个 /here 路径,那么它会更复杂,我可能会更改该路径。
Add
to your .htaccess so that the rewrite rules look something along the lines of
if you happen to have another /here path in you Drupal instance (e.g. a page), then it is more complicated and I would probably change that path.