I need to make accessing directories on my server case insensitive.
How do I do that using htaccess?
I need to make accessing directories on my server case insensitive.
How do I do that using htaccess?
You have to install and enable the mod_speling module in apache and set the CheckCaseOnly Directive to On in your .htaccess
CheckCaseOnly On
This is what I used because my hosting is shared and does not include the mod_spelling module but does support .htaccess, but this only works for one folder:
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^student-government/$ http://www.tombarrasso.com/Student-Government/ [R=302,NC,L]
The folder to redirect to can be any case, so you could use lower-case folders and redirect all variations of spelling there.
I suppose it could be adapted with a little bit of REGEX to work for all folders rather than just one. This worked for me on Apache 2.2.14 (Unix).