Get URL after URL Rewriting

554 views Asked by At

Can someone please tell me, is it possible to find out which URL is displayed currently on the browser? I am doing a URL rewrite, and in code I want to check which URL is currently displayed.

Is there a way to check this out?

I have tried to get the URL by Request.URL, but I am getting the actual URL not the rewritten URL.

So is there a way to get the displayed URL, instead of the actual URL?

Thanks in Advance.

1

There are 1 answers

1
Lincoln On

The only way to do this on the server-side is if you have access to the URL-rewrite context from the URL-rewriting tool you are using. Otherwise, the next reasonable approach would be to use javascript to get the var url = window.location, then use AJAX or a similar technique to send that URL back to the server, but this is costly.

Which URL-rewriting tool are you using? We need more information to answer this properly. Thanks.