【问题标题】:how to send a url with query string (containing a url as a query string) as a query string如何发送带有查询字符串的 url(包含作为查询字符串的 url)作为查询字符串
【发布时间】:2016-09-25 11:56:55
【问题描述】:

我需要重定向到一个 url,该 url 作为一个查询字符串发送到我的应用程序,其中包含一个 url 作为查询字符串。这可以重复三个或四个级别。

假设我的应用程序可以使用 example.com 访问,并且我有如下请求:

http://example.com/?landing={http://example2.com/?landing={http://example3.com/?landing={http://google.com}&param=4}&param=3}&param=1

'{' 和 '}' 用于增加可读性,实际上并不存在于 url 中。

我必须重定向到

http://example2.com/?landing={http://example3.com/?landing={http://google.com}&param=4}&param=3

example2 必须重定向到

http://example3.com/?landing={http://google.com}&param=4

example3 必须重定向到http://google.com

我不知道如何发送“登陆”查询字符串,以便将每个查询字符串传递到要使用的相应地址,或者如何在我的应用程序或 example2.com 上正确访问查询字符串或example3.com。 需要你的帮助,Tnx...

【问题讨论】:

    标签: c# wcf url redirect query-string


    【解决方案1】:

    我通过对源中的查询字符串进行编码(urlencoding 或 base64encoding)并将用户发送到相应的页面来解决了这个问题。在该页面上,查询字符串被解码,用户被重定向到下一个查询字符串,这个过程一直持续到最后一个登陆页面。

    【讨论】:

      猜你喜欢
      • 2012-05-12
      • 1970-01-01
      • 2014-06-29
      • 2011-05-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-09-28
      相关资源
      最近更新 更多