title: htaccess rewrite remove php extension on subdirectory
body: <p>My htaccess file is under this folder:</p>
  
  <p><a href="http://localhost/project/folder/" rel="nofollow">http://localhost/project/folder/</a><br />
  |<br />
  |--- change this like this:<br />
  |<br />
  |_ <a href="http://localhost/project/folder/about.php" rel="nofollow">http://localhost/project/folder/about.php</a><br />
  |____ <a href="http://localhost/project/folder/about" rel="nofollow">http://localhost/project/folder/about</a><br />
  |____ <a href="http://localhost/project/folder/about/" rel="nofollow">http://localhost/project/folder/about/</a><br />
  |<br />
  |_ <a href="http://localhost/project/folder/anything.php" rel="nofollow">http://localhost/project/folder/anything.php</a><br />
  |____ <a href="http://localhost/project/folder/anything" rel="nofollow">http://localhost/project/folder/anything</a><br />
  |____ <a href="http://localhost/project/folder/anything/" rel="nofollow">http://localhost/project/folder/anything/</a><br />
  |<br />
  |_ <a href="http://localhost/project/folder/file.php?id=8888" rel="nofollow">http://localhost/project/folder/file.php?id=8888</a><br />
  |____ <a href="http://localhost/project/folder/file/id/8888" rel="nofollow">http://localhost/project/folder/file/id/8888</a><br />
  |____ <a href="http://localhost/project/folder/file/id/8888/" rel="nofollow">http://localhost/project/folder/file/id/8888/</a><br />
  |<br />
  |_ <a href="http://localhost/project/folder/file.php?edit=8888" rel="nofollow">http://localhost/project/folder/file.php?edit=8888</a><br />
  |____ <a href="http://localhost/project/folder/file/edit/8888" rel="nofollow">http://localhost/project/folder/file/edit/8888</a><br />
  |____ <a href="http://localhost/project/folder/file/edit/8888/" rel="nofollow">http://localhost/project/folder/file/edit/8888/</a><br /></p>
  
  <p>What code I found until now:</p>
  
  <pre><code>Options +FollowSymLinks -MultiViews
  RewriteEngine On
  
  RewriteRule file/edit/(.*)/ file.php?edit=$1
  RewriteRule file/edit/(.*) file.php?edit=$1 
  
  RewriteRule file/id/(.*)/ file.php?id=$1
  RewriteRule file/id/(.*) file.php?id=$1
  
  
  # Remove file extension
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME}.php -f
  RewriteRule ^(.*)$ $1.php [NC,L]
  </code></pre>
  
  <p>Problem I am facing: if I try, <a href="http://localhost/project/folder/about" rel="nofollow">http://localhost/project/folder/about</a> working, but not <a href="http://localhost/project/folder/about/" rel="nofollow">http://localhost/project/folder/about/</a>.</p>