Using ASP.Net, I am trying to determine the actual URL requested by the user. For example if I type the following into my address bar:
http://mysite/////one//two
Fiddler shows me that this is the URL being sent over the wire however by the time it reaches ASP.Net al开发者_StackOverflow社区l of the variables in HttpContext.Current.Request are showing this URL:
http://mysite/one/two
The IIS logs show the same cleaned up version of the URL as ASP.Net. This causes some of the relative links on the site to break so I would like to at least detect and log these requests. I am using IIS7 on Windows 7 and .Net 3.5 SP1.
What is doing this translation and how can I find out the original URL?
The original URL can be reconstructed using Request.ServerVariables["HTTP_URL"]
which has the original unprocessed path.
精彩评论