2013-10-09, 11:42 AM
.htaccess files have nothing to do with php, they're control modules for apache.
The
Should really be all you need for most cases. It doesn't have to be in an .htaccess file either, you can put it directly in your httpd.conf at any level if you want it to effect all sites, or site wide to a specific site regardless of folder depth. htaccess files are overrides to the default conf.
The
Code:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.phpShould really be all you need for most cases. It doesn't have to be in an .htaccess file either, you can put it directly in your httpd.conf at any level if you want it to effect all sites, or site wide to a specific site regardless of folder depth. htaccess files are overrides to the default conf.
It's not having what you want - It's wanting what you've got.

