We need to do SEO redirect for urls like:
//////controller/action
to
/controller/action
Request.Url and Request.RawUrl doesn’t have ‘////’ part, it shows only one slash.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
What you are looking for is Request.ServerVariables[“HTTP_URL”].
If you are using IIS7 or above you may want to look at using the IIS Rewrite Module, which will allow you write a regex to catch URLs with multiple forward slashes and redirect them. This will save you having to write code to do it.
http://learn.iis.net/page.aspx/460/using-the-url-rewrite-module/