title: .htaccess rewrite with file path as parameter
body: <p>I have the following working:</p>
  
  <pre><code>RewriteEngine on
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  
  ### Rewrite url ###
  # Basic rewrite for pages in the admin area
  RewriteRule ^admin/([a-z/]*)$ /private/admin/index.php?path=$1 [L,QSA]
  </code></pre>
  
  <p>So the url could be someting like: <code>admin/overview/overview</code> making <code>overview/overview</code> the path. This is working fine but now I would like to add another parameter to be used as an id (for deleting / editing). So added the following rule:</p>
  
  <pre><code>RewriteRule ^admin/([a-z/]*)/([a-zA-Z0-9]*)$ /private/admin/index.php?path=$1&amp;id=$2 [L,QSA]
  </code></pre>
  
  <p>This is obviously not working: <code>admin/overview/overview/34</code> as everything behind <code>admin/</code> is seen as the path including <code>34</code>. But when I tried:</p>
  
  <pre><code>RewriteRule ^admin/([a-z/]*)-([a-zA-Z0-9]*)$ /private/admin/index.php?path=$1&amp;id=$2 [L,QSA]
  </code></pre>
  
  <p>Making the url <code>admin/overview/overview-34</code>, still didn't work. I also tried to place the line on different locations (before and after <code>RewriteRule ^admin/([a-z/]*)$ /private/admin/index.php?path=$1 [L,QSA]</code>)</p>
  
  <p>I hope someone can help me with this problem or give me an alternative way of doing this. </p>