We are replacing an existing Apache hosted web site with an ASPX IIS 7.5 hosted web site.
At present, Google displays several sub page results (relative to the main site) where the sub page (Apache) link looks something like this…
http://mysite.co.uk/mypage.html;jsessionid=D4F2C4D93229A451BCA886061501C777
I want this link to be (301) redirected by IIS to something like this…
http://mysite.co.uk/anotherpage.aspx
I can create an 301 HTTP redirect in IIS to redirect “mypage.html” to “anotherpage.aspx” but that doesn’t work when the incoming request for “mypage.html” also includes the “;jsession=…”.
I’ve looked at redirect wildcards but I can’t seem to get the right result.
Any advice would be much appreciated!
I solved this problem with IIS URL Rewrite. The following sample rule would solve the problem I described above…