我已经重建了一个网站从php到ASP.NET,需要将所有旧的可怕的页面URL重定向到新网站的根目录-旧网站只使用index.php和print.php,然后加载查询字符串值-所以我有以下规则
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不要接受Querystring,而只是重定向到根URL?
发布于 2010-02-25 19:30:27
规则应该是这样的:
RewriteRule ^print.php$ http://www.mynewsite.co.uk? [R=301,L]
RewriteRule ^index.php$ http://www.mynewsite.co.uk? [R=301,L]请注意"?“在替换结束时。
https://stackoverflow.com/questions/2242685
复制相似问题