On my server I am using this .htaccess to remove the .PHP extension:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
And it works fine, /about goes to the about.php page and /contact to the .contact.php file. However I have a projects.php and a projects folder so the hyperlink redirects to the folder index. I understand I could simply rename either the php or folder and solve the problem, but if I have subfolders in the projects folders, I won't be able to keep the URL as /projects/photography Here is an image to help explain: https://i.stack.imgur.com/TKjEF.png