title: Can't get static redirects to work with IIS Url Rewrite 2.0
body: <p>Running the following IIS URL Rewrite setup locally and can't get it to work (from web.config):</p>
  
  <pre><code>        &lt;rewrite&gt;
          &lt;rewriteMaps&gt;
              &lt;rewriteMap name="StaticRedirects"&gt;
                  &lt;add key="^tvb/" value="/tv/" /&gt;
              &lt;/rewriteMap&gt;
          &lt;/rewriteMaps&gt;
          &lt;rules&gt;
              &lt;rule name="StaticRedirectsRule" stopProcessing="true"&gt;
                  &lt;match url=".*" /&gt;
                  &lt;conditions&gt;
                      &lt;add input="{StaticRedirects: {REQUEST_URI}}" matchType="Pattern" pattern="(.+)" ignoreCase="true" negate="false" /&gt;
                  &lt;/conditions&gt;
                  &lt;action type="Redirect" url="{C:1}" appendQueryString="true" /&gt;
              &lt;/rule&gt;
          &lt;/rules&gt;
      &lt;/rewrite&gt;
  </code></pre>
  
  <p>Trying to open the url <a href="http://localhost/tvb/" rel="nofollow">http://localhost/tvb/</a> or <a href="http://localhost/tvb/?a=b" rel="nofollow">http://localhost/tvb/?a=b</a> returns a 404 error instead of redirecting me to <a href="http://localhost/tv" rel="nofollow">http://localhost/tv</a> (with or without query string). </p>
  
  <p>I've found similar posts here on stackoverflow and I've tried what they recommended:  recycling the app pool, restarting the IIS service, replacing REQUEST_URI with URL and/or REQUEST_FILENAME but none of these changes made a difference.</p>
  
  <p>Can anyone see where I went wrong?</p>