我試圖重定向從;htaccess從多個網址重定向到單個並刪除查詢字符串
http://www.example.com/news/newsitem.asp?story=20130227
http://www.example.com/news/newsitem.asp?story=20148893
還有其他的網址,我不知道,所以希望一切從新聞重定向/ 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