301 将index.php?dir=重定向到文件夹?
我想将以下内容重定向
http://www.example.com/folder/index.php?dir=Dir1
http://www.example.com/folder/index.php?dir=Dir1/Dir2
到
http://www.example.com/folder/Dir1
http://www.example.com/folder/Dir1/Dir2
我想要“301重定向”而不是“重写”,即我想要“index.php?dir=”链接到301重定向到文件夹结构。
请指教?
I want to redirect the following
http://www.example.com/folder/index.php?dir=Dir1
http://www.example.com/folder/index.php?dir=Dir1/Dir2
to
http://www.example.com/folder/Dir1
http://www.example.com/folder/Dir1/Dir2
I want to "301 Redirect" it NOT "Rewrite" i.e I want the "index.php?dir=" link to 301 redirect to folder structure.
Please advice?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 DocumentRoot
.htaccess
中执行此操作。Do this in your DocumentRoot
.htaccess
.工作后更改为301。
change to 301 once working.