开发者

Get URL after URL Rewriting

开发者 https://www.devze.com 2023-02-10 20:55 出处:网络
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.

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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号