开发者

How to get the URL's hash/anchor part on server?

My website uses asual address plugin for implementing hash based URLs.

I want to implement follwoing feature which facebook and twitter have successfully implemented.

Say I am not logged into twitter and click on the below link

http://twitter.com/#favorites

It will take me to login page(note the /favorites in querystring) http://twitter.com/login?redirect_after_login=/favorites

and after I login it will now load the page

http://twitter.com/#favorites

How to implement this? Since the URL segment following the hash is not sent to the server. So how they are able to get it in the redirected login URL

http://t开发者_StackOverflowwitter.com/login?redirect_after_login=/favorites


Well... after a lot of research the answer is "You can't".
Instead I am using JavaScript to
* detect any hash
* form the corresponding non hash URL and redirect to it.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜