You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This routing filter gem has proven a real gem for us over the years, and have allowed us to build a hugely complex multi-lingual and multi-regional, multi-store platform which never seems to miss a beat. It's been great to be able to accept requests both with and without a country prefix, and transparently send the user to the best matching content based on their location and language settings. It really is super awesome. But our clients have been complaining that they get penalised by google search engines since the same content is available on both /somepage and /DE/somepage, which makes sense I guess, though I always used to think this was a huge bonus; for example you can share a link to a product which automagically takes anyone who follows it to the correct language, currency and availability for that product in their region, while still allowing country specific URLs to always take you to the same store/currency - but google search engines disagree.
Now I'm tasked with finding a way to turn every request for a page that doesn't have a country prefix into a permanent redirect to the corresponding page with country (regardless of whether this might result in a 404), without breaking anything else. But how? Since the routing filter has modified the request.original_fullpath I cannot look at this to determine whether a country was given or not, and I cannot set up the redirect inside the routing filter itself. Furthermore, the redirect cannot be done at the proxy either, since we need access to the platform configuration and database to determine whence to send the user. Only a redirect done by the Rails platform has any chance of getting them to the right place. I've spent quite some time scratching my head over this but cannot find an angle. Help?
The text was updated successfully, but these errors were encountered:
Can you prepare example minimal app for me with failing test or failing test case in this repo for me so I can start quickly to inspect and prepare some solution for this?
This routing filter gem has proven a real gem for us over the years, and have allowed us to build a hugely complex multi-lingual and multi-regional, multi-store platform which never seems to miss a beat. It's been great to be able to accept requests both with and without a country prefix, and transparently send the user to the best matching content based on their location and language settings. It really is super awesome. But our clients have been complaining that they get penalised by
googlesearch engines since the same content is available on both /somepage and /DE/somepage, which makes sense I guess, though I always used to think this was a huge bonus; for example you can share a link to a product which automagically takes anyone who follows it to the correct language, currency and availability for that product in their region, while still allowing country specific URLs to always take you to the same store/currency - butgooglesearch engines disagree.Now I'm tasked with finding a way to turn every request for a page that doesn't have a country prefix into a permanent redirect to the corresponding page with country (regardless of whether this might result in a 404), without breaking anything else. But how? Since the routing filter has modified the
request.original_fullpath
I cannot look at this to determine whether a country was given or not, and I cannot set up the redirect inside the routing filter itself. Furthermore, the redirect cannot be done at the proxy either, since we need access to the platform configuration and database to determine whence to send the user. Only a redirect done by the Rails platform has any chance of getting them to the right place. I've spent quite some time scratching my head over this but cannot find an angle. Help?The text was updated successfully, but these errors were encountered: