On the server the directories are case senestive. Is there an easy way to handle a user entering in say an all lowercase name like mysub and it take them to mySub anyway?
You can make a custom 404 page that will redirect to the right page if your site is on a Unix/Linux or Mac web server. I'd recommend using server-side scripting for that so the 404 page doesn't have to load onto the client computer.
The best way to handle that is use links on a page in your web root so someone doesn't HAVE to type in a URL that might be case sensitive. I also don't recommend using mixed case directory names, especially with a web host where case sensitivity is an issue. You're just asking for user frustration and complaints with that.
If you can be consistent with the case of your files and directories (I concur with the others that all lowercase is best), a little PHP/ASP server-side file like the following would do the trick for most situations (I didn't test this, but it should be right):
I separated the URI from non-path content (anchors, GET variables, etc.) because you wouldn't want to strip capitalization from variable values. The only case this little script wouldn't cover would be variables from a form that uses method=POST (I would need more than two minutes to write something that would take care of that).
But if you want to have your filenames in mixed case, that would be a different animal...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.