title: Remove .PHP File Extension in URL
body: <p>I am having a little  issue forcing the .php file extension to be removed in the URL.</p>
  
  <p>I am successfully able to remove .php file extension if user:</p>
  
  <pre><code>#Remove PHP if original request is /foo/bar.php
  RewriteCond %{THE_REQUEST} "^[^ ]* .*?\.php[? ].*$"
  RewriteRule ^(.*)\.php(\?.*)?$ $1$2 [R=301,L]
  </code></pre>
  
  <p>My goal is to get it also to remove the extension if: </p>
  
  <pre><code># Remove PHP if original request is /foo.php/bar
  </code></pre>
  
  <p>I ask because right now a user can go to the URL and type <a href="http://www.site.com/contact.php/about" rel="nofollow">http://www.site.com/contact.php/about</a> and it will render my about page. My goal is force the removal of the .php and render:
  <a href="http://www.site.com/contact/about" rel="nofollow">http://www.site.com/contact/about</a></p>
  
  <p>I was hoping to take the code I have above and add it to but I can not figure it out.</p>
  
  <p>TIA</p>