我需要重定向到一个url,该url作为包含url作为查询字符串的查询字符串发送到我的应用程序。这可以在三个或四个级别重复。
假设我的应用程序可以使用example.com访问,我有一个请求:
http://example.com/?landing={http://example2.com/?landing={http://example3.com/?landing={http://google.com}¶m=4}¶m=3}¶m=1
' {'和'}'用于提高可读性,实际上不存在于URL中。
我必须重定向到
http://example2.com/?landing={http://example3.com/?landing={http://google.com}¶m=4}¶m=3
example2必须重定向到
http://example3.com/?landing={http://google.com}¶m=4
并且example3必须重定向到http://google.com
我不知道如何发送登陆'查询字符串,以便将每个查询字符串传递给要使用的相应地址,或者如何在我的应用程序或example2.com或example3.com中正确访问查询字符串。 需要你的帮助,Tnx ......
答案 0 :(得分:2)
我通过在源代码中编码(urlencoding或base64encoding)查询字符串并将用户发送到相应的页面来解决问题。在该页面上,查询字符串被解码,用户将重定向到下一个查询字符串,此过程将完成,直到最后一个登录页面。