I am currently using Apache 2.4.4. Now, the problem is that when I am creating alias like
Alias /mysite "D:/MySite"
it doesn't work for http://127.0.0.1/MySite
. So how can I make it case insensitive?
I am currently using Apache 2.4.4. Now, the problem is that when I am creating alias like
Alias /mysite "D:/MySite"
it doesn't work for http://127.0.0.1/MySite
. So how can I make it case insensitive?
Not with Alias
but it should work with AliasMatch
like this:
AliasMatch (?i)^/MySite(.*) "D:/MySite/$1"
I have no idea whether you can, but you shouldn't. RFC 3986 makes it clear in s3.2.2 that the hostname portion of a URI is case-insensitive:
The host subcomponent is case- insensitive
but there's no similar comment in s3.3, which governs the Path component of the URI. In addition, s6.2.3 notes that
Some schemes define additional subcomponents that consist of case-
insensitive data, giving an implicit license to normalizers to
convert this data to a common case (e.g., all lowercase).
Both these strongly suggest to me that case-insensitivity isn't a normal part of most sections of a URI. I'm sorry that Windows has led you to expect case-insensitivity in file systems, but this is not in fact the norm, and you are advised to avoid trying to make it become so.