开发者

ISAPI Rewrite Syntax Help

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:

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

Notice the "?" at the end of substitution.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜