title: How to rewrite a querystring with URL Rewrite
body: <p>Please I am just starting off with using iis rewrite module and I have a task to rewrite a url with querystring. </p>
  
  <p>What I have to do is rewrite this url 
  <a href="http://www.blah.com/Pages/Content.aspx?id=n%2fWA2PJCJXXnu8mvdC0jXQ%3d%3d&amp;ln=Gy7UlI4cSJE94Wa2qudbFQ%3d%3d" rel="nofollow">http://www.blah.com/Pages/Content.aspx?id=n%2fWA2PJCJXXnu8mvdC0jXQ%3d%3d&amp;ln=Gy7UlI4cSJE94Wa2qudbFQ%3d%3d</a></p>
  
  <p>to something like this <a href="http://www.blah.com/Pages/Content.aspx?id=Ecommerce" rel="nofollow">http://www.blah.com/Pages/Content.aspx?id=Ecommerce</a></p>
  
  <p>Hello Mathew thanks for the link, however I am not really up to speed with url rewrite module I have come with this and it doesn't seem to be working </p>
  
  <pre><code>&lt;rules&gt;
      &lt;rule name="QueryStringRW" stopProcessing="true"&gt;
          &lt;match url="^Content\.aspx$" ignoreCase="true" /&gt;
          &lt;conditions&gt;
              &lt;add input="{QUERY_STRING}" pattern="id=(\d+)" /&gt;
              &lt;add input="{IDtoTitleMap:{C:1}}" pattern="(.+)" /&gt;
          &lt;/conditions&gt;
          &lt;action type="Redirect" url="Content.aspx?id={C:1}" appendQueryString="false" redirectType="Permanent"/&gt;
      &lt;/rule&gt;
  &lt;/rules&gt;
  &lt;rewriteMaps&gt;
      &lt;rewriteMap name="IDtoTitleMap"&gt;
          &lt;add key="id=n%2fWA2PJCJXXnu8mvdC0jXQ%3d%3d&amp;ln=Gy7UlI4cSJE94Wa2qudbFQ%3d%3d" value="Id=Ecommerce" /&gt;
      &lt;/rewriteMap&gt;
  &lt;/rewriteMaps&gt;
  </code></pre>