1
votes

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
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 result imageJalpa Panchal
please mark the post as an answer. if your issue is resolved.Jalpa Panchal

2 Answers

1
votes

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
votes

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