问题
I'm having a problem with an IIS6 301 redirect. I've set up the following redirect for the domain domain.com to go to www.domain.com$S$Q (under Home Direcotry in Site Properties). Checked the A permanent redirection for this resource check box. but didnt check 'The exact URL entered above'
If I navigate to domain.com I get redirected to www.domain.com with no problems. But if I go to domain.com/page.asp?type=xx I get redirected to www.domain.com/page.asp?type=xx/page.asp
Anyone know what I'm doing wrong?
回答1:
You have to have "The exact URL entered above" checked, even if it seems counter-intuitive.
See http://www.developerfusion.com/code/4678/permanent-301-redirect-with-querystring-in-iis/ for the explanation regarding how the variables and remaining path are treated in the expansion.
来源:https://stackoverflow.com/questions/7480530/301-redirect-with-querystring-iis6