I am running 2.1.9 std on Debian Linux. I have a static context set up for my WordPress installation with a RewriteBase of /blog/ and the following as my rewrite rules:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php
This works fine, except that the -f and -d tests appear to be case sensitive, which is not the behavior I expected. I was under the impression that URI requests are case-insensitive, so, for instance, www.mydomain.com/blog/Test/index.html and www.mydomain.com/blog/test/index.html should resolve to the same thing. This does not work, however. If I have a directory named Test (mixed case) and try the URL with test (lower case) in it, the RewriteRule gets called. If I try the URL with the mixed case name, it correctly displays the file.
As stated in the Apache Rewrite docs, adding the [NC] option doesn't change this behavior, as [NC] doesn't apply to filesystem tests.
Is this a bug, or is it a misconception on my part? Is there some way to effectively make these case insensitive for those clueless web surfers who like to type in Index.html?
Thanks so much for you reply,
Jason
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php
This works fine, except that the -f and -d tests appear to be case sensitive, which is not the behavior I expected. I was under the impression that URI requests are case-insensitive, so, for instance, www.mydomain.com/blog/Test/index.html and www.mydomain.com/blog/test/index.html should resolve to the same thing. This does not work, however. If I have a directory named Test (mixed case) and try the URL with test (lower case) in it, the RewriteRule gets called. If I try the URL with the mixed case name, it correctly displays the file.
As stated in the Apache Rewrite docs, adding the [NC] option doesn't change this behavior, as [NC] doesn't apply to filesystem tests.
Is this a bug, or is it a misconception on my part? Is there some way to effectively make these case insensitive for those clueless web surfers who like to type in Index.html?
Thanks so much for you reply,
Jason