title: How to handle pagination in htaccess
body: <p>I am looking to add pagination with htaccess I have htaccess file which rewrites my PHP URLs like mysite/category/programming. but when I click on next page with pagination, the url looks like </p>
  
  <p><code>mysite/category.php?category=programming&amp;page=2</code> </p>
  
  <p>but I want to add pagination like this <code>mysite/category/programming/page/1</code></p>
  
  <p>I need clean URL like below</p>
  
  <p><code>mysite/category/programming/page/1</code></p>
  
  <p>with </p>
  
  <pre><code>RewriteRule ^category/([0-9a-zA-Z]+)$ category.php?category=$1 [NC,L]
  </code></pre>
  
  <p>but the result is </p>
  
  <blockquote>
    <p>mysite/category.php?category=programming&amp;page=2</p>
  </blockquote>