I have rebuilt a website from php into ASP.NET and need to redirect all the old horrible page URL’s to the root of the new site – The old site just used index.php and print.php then LOADS of querystring values – So I have the following rules
RewriteRule ^print.php$ http://www.mynewsite.co.uk [R=301,L]
RewriteRule ^index.php$ http://www.mynewsite.co.uk [R=301,L]
Problem I have is it is 301 redirecting but appending all the crappy querystrings to the end of the domain – for example
http://www.mynewsite.co.uk?crap=45&more&7698097987 etc...
How do I tell ISAPI not to take the Querystrings and just redirect to the root URL?
The rules should be like this:
Notice the “?” at the end of substitution.