NoCase option not supported
Created: Last updated:
I think you looked at your apache error_log and found the following warning:
"[warn] RewriteCond: NoCase option for non-regex pattern '-d' (-l and -s) is not supported and will be ignored"
Now you have searched for some explanation and I am glad you clicked my website because the answer about this NoCase is actually simple—in this case.
As you may have guessed and already know the problem is with your rewrite rule and one or more lines RewriteCond in your .htaccess file. Now you wonder: why?
Well then, lets look at the mod_rewrite documentation. Go to the section for the RewriteCond Directive. If you go to the bottom of that section you will find this line:
Remember: CondPattern is a perl compatible regular expression with some additions:
This line does not look like much but under listing 3. you see the explanation for the nocase|NC (no case) flag. Pay attention here to the last sentence!
This makes the test case-insensitive - differences between 'A-Z' and 'a-z' are ignored, both in the expanded TestString and the CondPattern. This flag is effective only for comparisons between TestString and CondPattern. It has no effect on filesystem and subrequest checks.
Did you see it? "no effect on filestystem"
The parameter-like '-d' (directory) '-f' (regular file) and '-l' (symbolic link) are your CondPattern for the perl compatible regular expression in the directive.
Unfortunately it is not explicitely written but these CondPatterns already are not case-sensitive. Hence, you can savely remove the [NC] from your rewrite condition if it is for filesystem requests.