We are hosting a site on IIS, and we are requiring HTTPS requests, and I've run across an odd bug related to how internet explorer (IE) handles that URL redirect.
If the initial request is
http://my.domain.com/?param1=hello¶m2=100
then IIS forces the request to be redirected to an HTTPS request, but the resulting request is
https://my.domain.com/?param1=hello¶m2=100¶m1=hello¶m2=100
In other modern browsers, this is not the case and the request is redirected as expected.
We are using URL Rewrite to redirect requests to HTTPS
Has anyone else seen this before, and is there anything that can be done to fix it?
After realizing that the redirect was occurring in IIS, I was looking at settings in the rewrite action and noticed that the check box Append query string was checked. After unchecking that box, it appears to have resolved the issue. Query strings are still present in the redirect, but they aren't being duplicated now in IE.
The setting can also be changed in xml of the web.config by adding appendQueryString = "false" to the <action> child.
In the web.config file before making the change, there was nothing explicitly specifying the state of appendQueryString, so it is important to note that it seems that the default behavior of a redirect action is to append the query string.
To change the setting in IIS:
(Pretty pictures of most of this procedure here)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With