I've been trying to hide the php extensions for my site. And I've been able to pull together a few Stackoverflow answers to do just that. However, I just have one last issue where when I POST, the resulting page is showing the .php extension. Can anybody help me on what I need to tweak with my htaccess file to not show .php completely?
# Turn mod_rewrite on
RewriteEngine On
RewriteCond %{REQUEST_METHOD} POST
RewriteRule ^ - [L]
# Unless directory, remove trailing slash
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/$ http://www.example.com/folder/$1 [R=301,L]
# Redirect external .php requests to extensionless url
RewriteCond %{THE_REQUEST} ^(.+)\.php([#?][^\ ]*)?\ HTTP/
RewriteRule ^(.+)\.php$ http://www.example.com/folder/$1 [R=301,L]
# Resolve .php file for extensionless php urls
RewriteRule ^([^/.]+)$ $1.php [L]
Here are the two resources I used from Stackoverflow: How to hide .php extension in .htaccess Website Form do not carry any value when .htaccess File Extension Remover Code is Used