Tell me, please, my site has a lot of translations made by the plugin, they all have the appearance For the main page: site.com/ru, site.com/tk (original site.com)

internal pages have the following URL: site.com/ru/page site.com/tk/page and TP (original site.com/page)

What rule can be used to make all transfers redirects to the original?

Thanks in advance for the advice

    1 answer 1

    using .htaccess

    RewriteRule ^tk/(.*)$ http://site.com/$1 [R=301,L] RewriteRule ^ru/(.*)$ http://site.com/$1 [R=301,L] 
    • the fact is that I have a lot of translations (over 60), and there are only 8 pages, can there be a way to make one rule for all translations of a specific page? - Dima Orlov
    • RewriteRule ^ tk /(.*)$ site.com/$1 [R = 301, L] - this rule will redirect any page that starts with / tk / to the same but to the root ... or don't you need it? - Boris
    • Well, you probably have to do that, but what about the internal ones? - Dima Orlov
    • internal will also be redirected about this rule, that is, kt / someUrl / will transfer to / someUrl / - Boris
    • yes, it works, thanks! - Dima Orlov