title: Percent sign in URL doesn't match rewrite rule (ASP.NET MVC project on IIS)
body: <p>I have an URL in the form</p>
  
  <pre><code>/search/search-terms
  </code></pre>
  
  <p>which is described in the RewriteRules.config to match the regular expression</p>
  
  <pre><code>^search/(.*)$
  </code></pre>
  
  <p>The action rewrites it to</p>
  
  <pre><code>Search.aspx?value={R:1}
  </code></pre>
  
  <p>with <code>appendQueryString</code> set to <code>true</code>.</p>
  
  <p>Everything is fine until I put an ampersand (&amp;) in the search terms. I encode "term1&amp;term2" to the URL string</p>
  
  <pre><code>/search/term1%26term2
  </code></pre>
  
  <p>but this URL is only matched up to <code>term1</code>. I'm not sure what causes this, whether the presence of the percent sign in the URL or a wrong encoding. What I know is that <code>Request["value"]</code> returns <code>term1</code> only, so this is not a problem with my logic but with the URL rewrite itself. </p>
  
  <p>How can I get the whole string, including the escaped ampersand? My logic then correctly decodes the escaped entity; I know this because it works in localhost, where no rewriting is performed. </p>