title: mod_rewrite error 404 if .php
body: <p>I rewrite my urls to be user friendly. For example I have a page called user.php that I rewrite to /user. But a user can still use user.php. Can I redirect to a 404 if they request a page with a .php extension?</p>
  
  <pre><code>Options -MultiViews +FollowSymlinks -Indexes
  RewriteEngine on
  
  
  RewriteRule ^user/([0-9]+)$ user.php?id=$1 [L,QSA]
  </code></pre>
  
  <p>Thanks.</p>