Comments (9)
Hi, this leads to duplicate content, IMHO - a bad idea. Take this article for example: http://www.hobo-web.co.uk/duplicate-content-problems/
from routing-filter.
@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?
from routing-filter.
What's the usecase for this?
from routing-filter.
@simi users could type website paths using both locale segments:
- website.com/zh-CN
- website.com/zh-cn
The last one (zh-cn
), as it is now (or as I think it is 😄), will not be accepted as valid because it's not listed into I18n.available_locales
.
We are looking for a valid solution to accept both versions setting the current locale to zh-CN
, if possible.
from routing-filter.
Just redirect from website.com/zh-cn/*
to zh-CN/*
.
from routing-filter.
Well, redirecting was what I was trying to avoid since zh-CN
is not the only possible locale with this issue and, being needed on a multidomain platform on which each domain can have multiple locales, it would require more maintenance work per domain/locale. I was trying to figure out if this can be made dynamic. Thanks anyway!
from routing-filter.
@simi p.s sorry for not pointing that out in the too simplified usecase I've presented!
from routing-filter.
301 redirect is the way to go for SEO, if locele is not in case sensitive I18n.available_locales
, I would check downcased version against downcased array of locales and redirect based on mapping from downcased match, eg. {"zh-cn" => "zh-CN"}. Indeed, this would be cool opt-in feature for this gem.
from routing-filter.
@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.
from routing-filter.
Related Issues (20)
- Inherited_resources & Simple_form gems - undefined method _path when building form HOT 1
- 0.4.0.pre Does Not Do Proper Routing HOT 5
- Didn't work on rails 4 HOT 2
- Is this gem support alive? HOT 2
- Devise "Not found. Authentication passthru."
- rails4 undefined local variable or method map HOT 5
- Set :include_default_locale to true ignored HOT 5
- Is there a plan to support Rails 5 ?
- New release ? HOT 8
- How to use filter in a block?
- I'm not able to make a custom filter work
- Routing Error instead of fallback to en
- Avoiding duplicate content SEO penalty HOT 2
- Why default locale is not fallen back to? HOT 1
- Update routing-filter to allow rails 5.2
- Won't work with Rails 6.1 HOT 5
- Please release new gem version HOT 4
- Filter locale breaks default_url_options in tests (setting the Locale from URL Params)
- README and repo description (on github) reference artweb-design HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from routing-filter.