Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Request.Url.AbsoluteUri and rewritten URL's

I need to be able to get the URL as I see it in the browser i.e The rewritten one. For instance:

If my Url was www.myurl.com/Test.html and I then used Request.Url.AbsoluteUri, the URL returned would be: www.myurl.com/Default.aspx?Action=Test

I need to be able to get back the exact rewritten URL.

Does anyone know how I can achieve this?

like image 987
webnoob Avatar asked Aug 03 '10 08:08

webnoob


1 Answers

From Tchami:

Have you tried Request.RawUrl? I think that gives you the unmapped URL.

Will mark this as the answer when I am allowed.

like image 96
webnoob Avatar answered Oct 03 '22 12:10

webnoob