How to obtain the SEO friendly URL and not the real one in server side code

994 Views Asked by At

I'm using URL redirection in my site, so in this way one url like hotels.aspx?idh=34 becomes a SEO friendly hotels-from-aruba.h.aspx.

The problem is that I need for example refer the URL to facebook recommendation button or something like from server side code and when I use the request.url method I get again "hotels.aspx?idh=34" when the URL used to access the page was "hotels-from-aruba.h.aspx."

¿How can I get from server side the SEO friendly URL?

Thanks.

1

There are 1 best solutions below

2
On BEST ANSWER

Use Request.RawUrl, that will be the URL the client requested (relative of course).