<rule name="replace query string" enabled="true" stopProcessing="true">
<match url="(.*)(ip=1)(.*)" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{QUERY_STRING}" pattern="(.*)(ip=1)(.*)" />
</conditions>
<action type="Redirect" url="{R:0}?{C:0}ip=0{C:2}" appendQueryString="false" logRewrittenUrl="true" />
</rule>
I have used the above rule and its creating duplicate query string
I have used below url
http://test.com/track/?ip=1&_=1589821794782
My main goal is to update the test.com to api.com and then change ip=1 to ip=0.
Can you please help me I'm new to this?

