1Options +MultiViews
2RewriteEngine On
3RewriteCond %{REQUEST_FILENAME} !-d
4RewriteCond %{REQUEST_FILENAME} !-f
5RewriteRule ^([^\.]+)$ $1.php [NC,L]
6
1# Run Php without filename extension
2RewriteEngine on
3RewriteCond %{REQUEST_FILENAME} !-d
4RewriteCond %{REQUEST_FILENAME}.php -f
5RewriteRule ^(.*)$ $1.php
6
7# Return 404 if original request is .php
8RewriteCond %{THE_REQUEST} "^[^ ]* .*?\.php[? ].*$"
9RewriteRule .* - [L,R=404]