I am trying to remove the php extensions for ALL files in different subfolders. The httaccess file is located in the root folder and it works JUST for the php files in the root directory but not for the subfolders.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
Works: http://url/login.php -> http://url/login
Don’t work: http://url/admin/overview.php -> http://url/admin/overview -> Internal Server Error