Response.Redirect()在IE(8)中重写主机名? [英] Response.Redirect() rewrites hostname in IE(8)?

查看:117
本文介绍了Response.Redirect()在IE(8)中重写主机名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Response.Redirect(1019characterLongUrl)将用户重定向到另一个域.我使用的网址长度为+ 1k个字符.这在Chrome和Firefox中完美运行.但是,一旦我使用Internet Explorer,URL的主机名就会被交换.

如果我使用的URL类似于:

<span>https://a01-bc-def.com/myDirA/myDirB?myQuery=XYZ...</span>

(请注意, https 更改为 http ),则在重定向到

http://localhost:9200/bc-def/myDirA/myDirB?myQuery=XYZ...

(为什么它在上述两种格式之间发生变化,我不知道-但我相信这与我使用的url的长度有关).

根据通过Google找到的几个网站,IE中URL的最大允许长度为2083个字符.这意味着我的URL应该可以使用.可能与URL使用SSL有关吗?我尝试从HTTP -> HTTPS以及HTTPS -> HTTPS发送重定向,但没有成功.如果我手动输入URL,它将正常工作.

我尝试在重定向中使用tinyURL,但发生相同的错误.我也曾尝试将网站发布到公共服务器(如前所述,使用SSL和不使用SSL),但错误仍然存​​在.

有什么想法吗?

解决方案

为什么不尝试为此加密URL?


因为我遵循的规范要求该URL要保持明文形式.


I''m trying to use Response.Redirect(1019characterLongUrl) to redirect the user to another domain. The URL I use is +1k characters long. This works perfectly in Chrome and Firefox. But as soon as I use Internet Explorer the hostname of the url is exchanged.

If the URL I use looks something like:

<span>https://a01-bc-def.com/myDirA/myDirB?myQuery=XYZ...</span>

(note that https changes to http) it would then be malformed in the redirect to

http://localhost:9200/bc-def/myDirA/myDirB?myQuery=XYZ...

or to

http://localhost:9200/myDirA/myDirB?myQuery=XYZ..

(Why it changes between the two mentioned formats, I don''t know - but I believe it has something to do with the length of the url I use).

According to several sites found via Google, the maximum allowed length of an URL in IE is 2083 characters. Meaning that my URL should be okay to use. Could it be related to the fact that the URL uses SSL? I''ve tried sending redirects from HTTP -> HTTPS as well as HTTPS -> HTTPS without any success. If I manually enter the URL it works without any errors.

I''ve tried using a tinyURL in the redirect but the same error occurs. I''ve also tried publishing the site to a public server (with and without SSL as mentioned about) but the error remains.

Any thoughts?

解决方案

Why not you try to encrypted URL for this?


Because the specifications I follow requires the URL to remain in clear text.


这篇关于Response.Redirect()在IE(8)中重写主机名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆