IIS rule "http rewrite" causes querystring duplicate

1.2k Views Asked by At

I set an IIS rule to redirect http traffic to https traffic, so I used the http rewrite rule. My original url contains 1 querystring param. When the rewrite is applied my new https url contains a duplicated querystring (2 equal params).

I tried modifying the rule by setting the appendQueryString param to false but it didn't worked.

Here's my rule:

<rewrite>
            <rules>
                <rule name="HTTP To HTTPS" enabled="true" stopProcessing="true">
                    <match url="(.*)" />
                    <conditions>
                        <add input="{HTTPS}" pattern="^OFF$" />
                    </conditions>
                    <action type="Redirect" url="https://{HTTP_HOST}{HTTP_URL}" appendQueryString="false" redirectType="SeeOther" />
                </rule>
            </rules>
</rewrite>
2

There are 2 best solutions below

0
Jalpa Panchal On BEST ANSWER

try to clear browser cache and try again. as you explain I tested your rule it's working well with a query string and not repeating that. you can see the image.

enter image description here

0
cicaletto79 On

Thanks to Jalpa's comment that suggested me clearing cache is enough, it worked :)