Here is my current .htaccess:
RewriteEngine on
RewriteBase /cp/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !\.php$
RewriteRule ^(?!\s*$).* $0.php [L]
This is affecting the folders in the same directory.
Here is an example folder directory:
- ..
- css/
- images/
- filename.php
If I the url: WEBSITE.com/filename is entered, the filename.php is pulled, but when I enter WEBSITE.com/css, WEBSITE.com/css/.php is pulled.
I do not want the .htaccess to affect sub-directories and do not want to put individual .htaccess files in each folder.
Thanks to jasssonpet.
I thought I was supposed to replace
add RewriteCond %{REQUEST_FILENAME} !-finstead of addingadd RewriteCond %{REQUEST_FILENAME} !-d.