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: https://a01-bc-def.com/myDirA/myDirB?myQuery=XYZ... (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?
EDIT: I've managed to work around this by using the Refresh meta tag! This feels like a very ugly solution so I still wish to solve the main problem.