-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for case insensitive locales #58
Comments
Hi, this leads to duplicate content, IMHO - a bad idea. Take this article for example: http://www.hobo-web.co.uk/duplicate-content-problems/ |
@rubyconvict you are totally right! I didn't considered this aspect. Do you have any other idea about how to implement this? Or do you think it's not doable at all? |
What's the usecase for this? |
@simi users could type website paths using both locale segments:
The last one ( We are looking for a valid solution to accept both versions setting the current locale to |
Just redirect from |
Well, redirecting was what I was trying to avoid since |
@simi p.s sorry for not pointing that out in the too simplified usecase I've presented! |
301 redirect is the way to go for SEO, if locele is not in case sensitive |
@rubyconvict yes, that would be great and solve our usecase. Just wondering if and how is possible to make redirects from inside a routing filter. I can't see anything like that in other provided filters. |
For example it will both support
zh-CN
andzh-cn
segments.Here's the code we used for a project we are working on:
As you can see it uses an additional hash that maps downcased locales symbols with their original versions. This will allow to fetch the right locale after extracting the URL segment.
If you think this could be useful we can provide a PR to include this support.
/cc @elia @masterkain
The text was updated successfully, but these errors were encountered: