Reputation: 281
I use 3 hosting for my websites, all of them have the same rules in htaccess. One of the hosting was upgraded from Apache 2.2 to 2.4 and now I am getting errors spam and I don't know how to fix it without lossing the rule.
[Mon Jun 15 19:38:33.189697 2015] [rewrite:warn] [pid 236909] AH00665: RewriteCond: NoCase option for non-regex pattern '-f' is not supported and will be ignored. (/home//public_html/.com/.htaccess:31)
Here's the rule:
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{DOCUMENT_ROOT}/$1\.php -f [NC]
RewriteRule ^(.+?)/?$ /$1.php [L]
Upvotes: 0
Views: 270
Reputation: 4800
The NoCase ([NC]
) doesn't even make sense there as you're not matching anything. Just take it out.
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{DOCUMENT_ROOT}/$1\.php -f
RewriteRule ^(.+?)/?$ /$1.php [L]
Upvotes: 2