title: IIS URL Rewrite Module : Redirect Based On QueryString
body: <p>I Have some problems with redirecting to another URL based on the query string parameters. I want to redirect users which enter www.domain.com/signup.aspx?p=1 to: </p>
  
  <p>www.domain.com/signup</p>
  
  <pre><code>&lt;rule name="Signup Redirect 1" stopProcessing="true"&gt;
    &lt;match url="signup\.aspx\?p=1" /&gt;
    &lt;conditions logicalGrouping="MatchAll" /&gt;
    &lt;action type="Redirect" url="signup" redirectType="Temporary" /&gt;
  &lt;/rule&gt;
  </code></pre>
  
  <p>Now when they enter www.domain.com/signup.aspx?p=2 they must go to: </p>
  
  <p>www.domain.com/signup/promocode</p>
  
  <pre><code>&lt;rule name="Signup Redirect 2" stopProcessing="true"&gt;
    &lt;match url="signup\.aspx\?p=2" /&gt;
    &lt;conditions logicalGrouping="MatchAll" /&gt;
    &lt;action type="Redirect" url="signup/promocode" redirectType="Temporary" /&gt;
  &lt;/rule&gt;
  </code></pre>
  
  <p>The above rules don't work. What is the right way to do this? Thanks in Advance.</p>
  
  <p>Gr</p>
  
  <p>Martijn</p>