title: Conflicting htaccess rewrite rules
body: <p>I am using two rewrite rules within a directory - one to remove php extension from all php files and the other for a pretty URL but they seem to be clashing with each other.</p>
  
  <pre><code>RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME}\.php -f
  RewriteRule ^(.*)$ $1.php
  
  RewriteRule ^view/doc/([a-zA-Z0-9.]+) /documents/view.php?doc=$1 [L]
  RewriteRule ^view/photo/([a-zA-Z0-9.]+) /documents/view.php?photo=$1 [L]
  </code></pre>
  
  <p>When I try and link to a file, the file does not load - when I check the contents of the GET array I can see that the filename has .php added to it so it, correctly in this case, is never viewable.</p>
  
  <pre><code>Array ( [doc] =&gt; 31f224f801547fd743d5e935d7050a3a.pdf.php )
  </code></pre>
  
  <p>The file itself could be any 32 characters followed by a number of extensions (doc, xls, pdf, txt, rtf and more) so I am assuming that the regex is correct so is the first rewrite causing this and, if so, can I use both in the same directory without any issues?</p>