Question Locked

Mixed Case URLs

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi
The issue is with the mixed case URLs. For eg a URL is like https://abc.com/childcarehelp but if I want the URL like https://abc.com/ChildCareHelp then I can make both of them end up at
at https://abc.com/childcarehelp by creating two folders and putting in a redirect but since this is a redirect sometimes a little typing mistake like this https://abc.com/ChildCAreHelp breaks the link taking the page to an error page. So the question is is there any solution in lighttpd for this which can be applied to the folders like in this case childcarehelp that make thins happen.
Thanks in advance

7 replies

by slayer_

I had this issue with a LAMP server.
WAMP server has no such issues, its case insensitive.

by tobif

Can't you just use the parameter server.force-lowercase-filenames in the config file for lightppd?

by tobif

A rewrite won't affect how the URL is shown in the client, it's merely a way to map logical addresses to real resource location internally in the server.

In the same way, I guess that "force-lowercase" won't change what's seen in the URL window.

So, try this parameter. If it helps you find your file (which should be named with all lowercase), then put a script in this very page, which will check the capitalization of the url and, if needed, issue a redirect to the "correct" capitalization of said address (thus fixing your statistics, as well...)

by backtrack8083

Hi Tobif
I tried exactly the way you told in your last post but it didn't helped. Its still giving me an error. Do you have some other alternative to this. I have heard about regular expressions making things happen in this case but don't know how to do that.
Thanks

by tobif

I know this is not what you want to get at the end, but if you name the whole path with lowercase and use the force-lowercase statement:
- Will a user reach the correct page even if s/he capitalizes the way you intent?
- If yes, will the capitalization used by the user remain unchanged in the address bar of the browser?

If the answer to these questions are positive, then we'll be ready for next step.

This discussion is closed to new replies.