Redirection for multilingual site

#606368
  • Resolved Jkocken
    Rank Math free

    I use RankMath Redirection for all my URL redirections. I use WPML as the translation plugin for my site. I have a main site in English and an additional 6 languages.

    My permalink structure is always in English and the multilingual site is part of the permalink structure like so: English: domain.com/page-name/ German: domain.com/de/page-name/ etc.

    When I want to redirect a page I would do something like this:
    Source URLs: /page-name/ Destination URL: https://domain.com/new-page-name

    But how can I make this redirect apply to ALL languages at the same time?

    I tried to use RegEx like this:
    Source URLs: (.*)/page-name/ Destination URL: https://domain.com/$1/new-page-name

    but it causes unnecessary complications. Is this not built into your plugin somewhere?

    Best, Judith

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    Thank you for your query and we are so sorry about the trouble this must have caused.

    At the moment, our plugin can’t handle these types of redirection and it may require you to create a single redirection for each language or you can try this .htaccess directives:

    RewriteEngine On
    RewriteRule ^(en|de|fr|es|...)/page-name/$ https://domain.com/$1/new-page-name [R=301,L]

    Please make sure to backup your .htaccess before changing anything.

    Hope that helps and please do not hesitate to let us know if you need my assistance with anything else.

    Jkocken
    Rank Math free

    Thanks. So there is no Regex rule I can use within the plugin to redirect the various pages?

    I can do them individually but it would be useful to add this functionality to your plugin somehow in the future.

    Hello,

    Yes, Rank Math could not handle that kind of redirection.

    However, we’ve added your vote to our internal suggestions lists for the feature. If this is something that we’re able to introduce in the future, we’ll be sure to let you know.

    You can also keep an eye on our changelog here:
    https://rankmath.com/changelog/

    Looking forward to helping you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

The ticket ‘Redirection for multilingual site’ is closed to new replies.