title: Use long list of .htaccess RewriteRule or use a single catchall and direct in PHP?
body: <p>Say im using .htaccess file for clean looking links, but that I have a long list (say 20) of RewriteRules to do things like this</p>
  
  <pre><code>domain.com/user/adam --&gt; domain.com/user.php?need=user&amp;user=adam
  domain.com/test.js --&gt; domain.com/index.php?need=code&amp;file=test.js
  domain.com/test.js/edit --&gt; domain.com/index.php?need=code&amp;file=test.js&amp;action=edit
  </code></pre>
  
  <p>Is it better to use a catch all RewriteRule and split on the slash/ parse and direct in PHP? Or is the long list of RewriteRule better?</p>
  
  <p>Better I guess I mean faster, and more robust. I know that upkeep would be better with the catch all.</p>
  
  <p>Also, can you recommend a php class example/article on doing this?</p>