Hi @Joe Nalducci ,
According to your description, I wrote a rule and test it very well. You can try it.
<rewrite>
<rules>
<rule name="rule1">
<match url="(folder1)/(folder2)/(.*)" />
<conditions>
<add input="{QUERY_STRING}" pattern="(@accountID=([0-9]+))&(SiteID=([0-9]+))&(.*)" />
</conditions>
<action type="Rewrite" url="http://localhost:801/{R:1}/{R:2}/?@accountID=100&SiteID=2007&{C:5}" appendQueryString="false" />
</rule>
</rules>
</rewrite>
Please use failed request tracing to find out the issue of your rule.
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best regards,
Bruce Zhang