title: Manage url-writing in .htaccess or in PHP code?
body: <p>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:</p>
  
  <pre><code># BEGIN WordPress
  &lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteBase /
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.php [L]
  &lt;/IfModule&gt;
  
  # END WordPress
  </code></pre>
  
  <p>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.</p>
  
  <p>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?</p>