title: How do I use web.config to redirect to a query string on Windows Server 2008 R2?
body: <p>I've got a redirect I want to do using web.config on an IIS 7.5 server running Windows Server 2008 R2. I'd like to simply make a shortcut URL for another URL with a very long query string:</p>
  
  <p>www.example.com/redirect -> www.example.com/long_url.aspx?key1=value1&amp;key2=value2</p>
  
  <p>When I add the following rewrite rule to web.config though, it gives a 500 Internal Server Error:</p>
  
  <pre><code>&lt;configuration&gt;
      &lt;system.webServer&gt;
          &lt;rewrite&gt;
              &lt;rules&gt;
                  &lt;rule name="^redirect$" stopProcessing="true"&gt;
                      &lt;match url="^redirect$" /&gt;
                      &lt;action type="Redirect" url="/long_url.aspx?key1=value1&amp;key2=value2" /&gt;
                  &lt;/rule&gt;
              &lt;/rules&gt;
          &lt;/rewrite&gt;
      &lt;/system.webServer&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>What do I need to change to get this to work?</p>