I'm studying how to do url rewriting in a LAMP framework. I began my research by studying wordpress code. I looked at wordpress's .htaccess and saw this:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
I was surprised AND delighted! I was surprised because I didn't see any of those regular expression-like rules. I was delighted because I can delay learning how .htaccess files work (rushing for deadline), use the above script and parse the $_SERVER variable in PHP for url data.
So my question is, what are the advantages/disadvantages of managing url rewrites in the .htaccess file? And what are the advantages/disadvantages of managing url rewrites in the PHP code?