title: IIS Rewrite Safely Add Custom Query String
body: <p>I want to move something in a url path out to the query string. This is almost like a subdomain rewrite. Here's what the rewrite should look like:
  ~/ch-ar/rest -> ~/rest?dom=ch-ar
  ~/su-bd/rest?param=val -> ~/rest?param=val&amp;dom=su-bd</p>
  
  <p>I can definitely do the first part through matching/replacing isn't something I have been able to account for. I'm not sure if there's some way to safely add my key value pair to the {QUERY_STRING} variable but that would probably be ideal. The key for this name value pair will never change and the order of the query string doesn't matter to me.</p>