title: ISAPI Rewrite Syntax Help?
body: <p>I'm struggling to get some code working for an old ASP store site I manage - I have added the following which works perfectly well</p>
  
  <pre><code>RewriteBase /
  RewriteRule ^cat/[^?/]*_(\d+)\.htm /store/prodList.asp?idcategory=$1 [QSA]
  </code></pre>
  
  <p>Problem is if the category page has more than one page!  As it adds another couple of parameters to the querystring like so</p>
  
  <pre><code>/store/prodList.asp?idcategory=102&amp;curPage=2&amp;sortField=sortorder
  </code></pre>
  
  <p>I'm looking for an example of taking three more querystring parameters and appending it to the rewritten URL... Can anyone help please?</p>
  
  <p>So for example, currently the following URL works fine</p>
  
  <pre><code>cat/productname_5.htm ... equates to ... /store/prodList.asp?idcategory=5
  </code></pre>
  
  <p>I need to do something like the following when I have more than one page?  but don't know the ISAPI syntax?</p>
  
  <pre><code>cat/productname_5_2_sortorder.htm ... would equate to ... /store/prodList.asp?idcategory=5&amp;curPage=2&amp;sortField=sortorder
  </code></pre>
  
  <p>I hope that makes more sense?</p>