将 url 路径中包含特定单词的 URL 重定向到另一个页面
我的某些网址中有一条路径,导致我不希望用户浏览到不需要的目的地:即: http://mywebsite/mysite/undesirable-path/anything-could-be-here/
当用户浏览到 url 中包含 /undesirable-path/ 的任何页面时,我会喜欢他们最终到达主页。
另一个更复杂的示例是:
- http://mywebsite/mysite/undesirable-path /anything-could-be-here/
- http://mywebsite /yoursite/undesirable-path/anything-could-be-here/
所以像 ?/undesirable-path/? - 之前的任何事情和之后的任何事情。
I have a path in some of my urls that results in an undesirable destination that I dont want users to browse to: i.e: http://mywebsite/mysite/undesirable-path/anything-could-be-here/
When users browse to any page with /undesirable-path/ in the url Id like them to just end up at the home page.
another more complex example would be:
- http://mywebsite/mysite/undesirable-path/anything-could-be-here/
- http://mywebsite/yoursite/undesirable-path/anything-could-be-here/
so something like ?/undesirable-path/? - anything before and anything after.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
http://www.htaccessredirect.net/index.php
http://www.htaccessredirect.net/index.php