title: URL Rewrite Redirect
body: <p>I dont understand writing URL Rewrite aspects yet.  But need assistance as I dont know what I am doing incorrectly.</p>
  
  <p>My goal is when a USER clicks on a link</p>
  
  <p><strong>www.example.com/NM/Registration?ctl=PasswordReset&amp;resetToken=db08aa18-0810-417d-a633-131635bf9e8e</strong></p>
  
  <p>I would like the user to be redirected to </p>
  
  <p><strong>www.example.com/Registration?ctl=PasswordReset&amp;resetToken=db08aa18-0810-417d-a633-131635bf9e8e</strong></p>
  
  <p>As you can see I would like to redirect without the <strong>NM</strong> in the URL path to the root domain.</p>
  
  <p>I have this in my web.config file but it seems that it wont redirect properly:</p>
  
  <pre><code>&lt;rewrite&gt;
    &lt;rules&gt;
  
        &lt;rule name="Query String Rewrite"&gt;
            &lt;match url="/NM/Registration" /&gt;
            &lt;conditions&gt;
                      &lt;add input="{QUERY_STRING}" pattern="ctl=([a-z]+)" /&gt;
                      &lt;add input="##{C:1}##_{QUERY_STRING}" pattern="##([^#]+)##_.*resetToken=([_0-9a-z-]+)" /&gt;
            &lt;/conditions&gt;
            &lt;action type="Redirect" url="http://www.example.com/Registration?ctl={C:1}&amp;amp;resetToken={C:2}" appendQueryString="false" /&gt;
        &lt;/rule&gt;
  
    &lt;/rules&gt;
  &lt;/rewrite&gt;
  </code></pre>