Jako / LangRouter

Language context router for use with Babel in MODX Revolution
https://jako.github.io/LangRouter/
GNU General Public License v2.0
10 stars 4 forks source link

Possible duplicated content. #24

Closed ysanmiguel closed 4 years ago

ysanmiguel commented 4 years ago

Hello mate. It's possible to access to the main context via / and /cultureKey/ creating two different addresses to get to the same point.

domain.com/ and domain.com/en/
or domain.com/page-four.html and domain.com/en/page-four.html
will open the same page without changing the address.

I think (unless I'm wrong) that is duplicated content and might be penalised by SEO rules. should be redirected via 301 to one or the other all the time.

Cheers.

Jako commented 4 years ago

Could you post your context settings of the different language contexts?

ysanmiguel commented 4 years ago

Here they are:

Context = web (default) base_url: / cultureKey: en http_host: domain.com site_start: 1 site_ur: {url_scheme}{http_host}{base_url}{cultureKey}/

Context = es base_url: / cultureKey: es http_host: domain.com site_start: 7 site_ur: {url_scheme}{http_host}{base_url}{cultureKey}/

Jako commented 4 years ago

I have tested your config and it seems that {cultureKey} is not replaced in the site_url context setting. That could have caused the other issues, since there is only one site_url for every context now.