I'm trying to remove all .php extensions with the following...
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
However I have a directory - mysite.com/example/ which will no longer show the index.php file, instead, I have to visit mysite.com/example/index. I'm sure there must be a work-around for this? Thanks
EDIT: The aim is to be able to visit mysite.com/example/ and load the index page as normal. But for files such as mysite.com/example/test.php the .php extension will be removed and will load from the link mysite.com/example/test