title: How to create clean url using .htaccess for multiple parameters?
body: <p>I try to make clean URLS to my web site. 
  The desired format is: site/category/num example site/sport/3</p>
  
  <p>Both category and page are optional parameters. So i have three rules. The problem is rule three. It only work in first time. </p>
  
  <p>User enter site - tule 1. OK.
  User navigate and pick category. Rule 2... OK.
  User navigate and want page 2 page. (rule 3) OK. 
  User want see more items in page 3 (rule 3) Error..</p>
  
  <p>I got parameter site/category/category/3 and navigatioin fail. Now i dont get why do i get category two times.</p>
  
  <p>My .htaccess file work almost.</p>
  
  <pre><code>RewriteEngine On
  
  RewriteCond %{REQUEST_URI} !(\.css|\.js|\.png|\.jpg|\.gif|robots\.txt)$ [NC]
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^([0-9]+)$ /index.php?page=$1 [L]
  
  RewriteCond %{REQUEST_URI} !(\.css|\.js|\.png|\.jpg|\.gif|robots\.txt)$ [NC]
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^([^/]+)$ /index.php?category=$1 [L]
  
  RewriteCond %{REQUEST_URI} !(\.css|\.js|\.png|\.jpg|\.gif|robots\.txt)$ [NC]
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^([0-9a-zA-Z_-]+)/([0-9]+)$ index.php?category=$1&amp;page=$2 [NC,L]
  </code></pre>