Search code examples
phptypo3multilingualrealurl

Restrict page path translations?


we are using realurl 1.13.6 and looking forward to enable a third language. The pages have translated content and the switch works well. Since we also added translated page paths we encounter the possible duplicate content issue by google, since the same page / language is available via /nl/dutch-title/ and /nl/german-title/

The "nl" is used to set the language to dutch and the left over to determine the page. Since both paths are leading to the same page_id and the language ist set to "nl_NL" both could trigger the duplicate issue...

Is there a way to restrict realurl to only allow translated page paths matching the active language? Or redirect to the correct translation of the path?

"A": /de/german-path/ -> page id 10 de_DE content
"B": /nl/dutch-path/ -> page id 10 nl_NL content
"C": /nl/german-path/ -> redirect to "B"

In case "C" we want the path to be corrected if the path does not match the nl_NL path translation. If that is not possible a strict mode only allowing translated paths matching the active language in some way would be nice - redirecting to 404 with wrong path.

Is this handled in newer versions of realurl, maybe upgrading is all we need?

Someone already solved a similar issue? Any help is highly appreciated.

Thank you for reading!


Solution

  • I would solve this by adding a canonical URL. That makes sure the search engines know what URLs to index and the user doesn't get a 404.

    Btw search engines don't invent the URLs themselves so don't think there is a great risk that the wrong URLs are indexed.