htaccess重写规则重定向
我有一些旧的网址
http://www.website.com/result/?q=&result=1
http://www.website.com/result/?q=&result=2
http://www.website.com/result/?q=&result=3
http://www.website.com/result/?q=&result=4
等..可能会达到大约 60
我是否可以创建一个规则,将任何看起来像这样的查询重定向到主页 /home/ 而不是我尝试单独重定向所有查询?
提前致谢
I have some old urls
http://www.website.com/result/?q=&result=1
http://www.website.com/result/?q=&result=2
http://www.website.com/result/?q=&result=3
http://www.website.com/result/?q=&result=4
etc.. probably going up to about 60
Is there anyway I can create one rule that redirects any query that looks like this to the home page /home/ instead of my trying to redirect all of them individualy?
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,我想你正在使用 apache HTTPD。在您的服务器配置中,您可以定义一个正则表达式来过滤您想要的模式。例如:
定义一个正则表达式并告诉重定向到哪里或做什么。
希望这有帮助,干杯
yes, i suppose you are using apache HTTPD. In your server configuration you can define an regular expression which filter the pattern you want. For example:
Define a RegExp and tell where to redirect or what to do.
Hope this helps, Cheers