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
domain.com/user/adam --> domain.com/user.php?need=user&user=adam
domain.com/test.js --> domain.com/index.php?need=code&file=test.js
domain.com/test.js/edit --> domain.com/index.php?need=code&file=test.js&action=edit
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?
Better I guess I mean faster, and more robust. I know that upkeep would be better with the catch all.
Also, can you recommend a php class example/article on doing this?