Question

Locked

Mixed Case URLs

By backtrack8083 ·
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

This conversation is currently closed to new comments.

7 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

I am curious too

by Slayer_ In reply to Mixed Case URLs

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

Collapse -

server.force-lowercase-filenames

by TobiF In reply to Mixed Case URLs

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

Collapse -

Mixed Case URLs

by backtrack8083 In reply to server.force-lowercase-fi ...

Thanks for your help. But this is something which will force it to have all lowercase but what i want is if the domain is http://abc.com/ChildCareHelp and if a person by mistake types http://abc.com/CHildCareHelp it opens the 404 not found error page. I want that irrespective of any typing mistake http://abc.com/ChildCareHelp should open. Is there something in lighttpd that can fix this problem.
Thanks in advance

Collapse -

Hang on

by TobiF In reply to Mixed Case URLs

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...)

Collapse -

Mixed Case URLs

by backtrack8083 In reply to Hang on

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

Collapse -

Step by step

by TobiF In reply to Mixed Case URLs

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.

Back to Software Forum
7 total posts (Page 1 of 1)  

Related Discussions

Related Forums