奇怪的返回url


Weird return url

我正在尝试使用oauth2

我提出了一个get请求,然后在我之前设置的回调url处重定向。问题在于url参数前面有#符号,因此php.net无法读取它们!

我在浏览器中的以下url中被重定向:

http://localhost:1787/About.aspx?#access_token=f3EToovT2bQNNOQ&token_type=承载&merchant_ id=A6BGD4BH&response_type=令牌

Request.Params为空,request.query string为空。即使当我使用php并打印$_REQUEST数组时,它仍然是空的!

这怎么可能?

#之后的内容不会标记为发送到服务器的DATA,而是客户端的哈希。

尝试使用JavaScript重定向仅使用哈希:

window.location = window.location.pathname + '?' + window.location.hash.substring(1);