【发布时间】:2015-09-03 11:03:29
【问题描述】:
我正在尝试重定向网址;
http://www.example.com/news/newsitem.asp?story=20130227
http://www.example.com/news/newsitem.asp?story=20148893
还有其他我不知道的 url,所以想从 news/newsitem.asp 重定向所有内容 到
http://www.example.com/blog
我正在使用
RewriteRule ^news/newsitem.asp http://www.example.com/blog [R=301,L]
但结果将查询字符串添加到末尾
结果 = http://www.example.com/blog?story=20130227
如何停止追加查询字符串?
我确实找到了这篇文章,但似乎无法让它工作 redirect a single URL to another - removing the query string
【问题讨论】:
标签: .htaccess mod-rewrite redirect