I'm having to add a parameter to the end of a specific URL using IIS rules - and I'm having trouble.
When someone hits the url: https://lakepointe1.condoconduit.com/LakePointe1/ListMessages.cdo I want to add a parameter to the end of the request URL like this: https://lakepointe1.condoconduit.com/LakePointe1/ListMessages.cdo?CondoCode=M40GGRBB
I created this inbound rule in IIS but it's not redirecting in my browser so I must have something wrong:
Please advise!

Simplified:
<rule name="Lakepointe1 Discussions" stopProcessing="true">
<match url="(.*)/LakePointe1/ListMessages.cdo(.*)" />
<conditions>
<add input="{QUERY_STRING}" pattern="CondoCode=M40GGRBB" negate="true" />
</conditions>
<action type="Redirect" url="{R:0}" appendQueryString="true" />
</rule>
What are you trying to do? Add to the query string? The code you have in <conditions>
is checking for that query string - ie. it's a match query not adding anything.
I think if you want to add something you have to add it to url={R:0}?query=value
... or if you need to pull it off the URL you can use one of the match groups (ie. {R:1}
or {R:2}
in your query).
Not exactly the same, but I do something similar with my new Help Documentation solution where I convert from the old syntax to new:
<rewrite>
<rules>
<!-- Html Help Builder routing -->
<rule name="Extract Topic ID" stopProcessing="true">
<match url="(_.*).html?$" />
<action type="Redirect" url="https://{HTTP_HOST}/docs/?topic={R:1}" redirectType="Permanent" />
</rule>
</rules>
</rewrite>
In this case I want to actually redirect to let search engines know that a different url should be used but the same would work with the url as you're doing.
+++ Rick ---