2010-02-11 81 views
0

我已經從php重建了一個網站到ASP.NET,並且需要將所有舊的可怕頁面URL重定向到新網站的根目錄 - 舊網站只是使用了index.php和print.php,然後LOADS查詢字符串值的 - 所以,我有以下規則ISAPI重寫語法幫助

RewriteRule ^print.php$ http://www.mynewsite.co.uk [R=301,L] 
RewriteRule ^index.php$ http://www.mynewsite.co.uk [R=301,L] 

問題我已經是它是301重定向,但附加所有蹩腳的查詢字符串到域的結束 - 比如

http://www.mynewsite.co.uk?crap=45&more&7698097987 etc... 

我如何告訴ISAPI不要採取Querystrings並只重定向到根URL?

回答

2

的規則應該是這樣的: 「?」

RewriteRule ^print.php$ http://www.mynewsite.co.uk? [R=301,L] 
RewriteRule ^index.php$ http://www.mynewsite.co.uk? [R=301,L] 

的通知在替代結束時。