Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client needed to redirect all pages, products, and other content from a deleted language (e.g., /deletedlanguage/) to the default language homepage.
Solution:
We recommended using the Redirection plugin (https://wpml.org/plugin/redirection/) or adding the following code to the .htaccess file:

RewriteEngine On<br />RewriteRule ^deletedlanguage/(.*)$ / [R=301,L]

*The "deletedlanguage" should be replaced with the actual language prefix that was deleted.
*We also advised the client to ensure they have a full backup of their website before making any changes to the .htaccess file.

If you're experiencing a similar issue, we recommend trying the above solution. However, please note that this solution might be outdated or not applicable to your case. If it doesn't resolve your issue, we highly recommend checking related known issues (https://wpml.org/known-issues/), verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you still need assistance, please don't hesitate to open a new support ticket with us.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 2 replies, has 2 voices.

Last updated by Marsel Nikolli 9 months, 3 weeks ago.

Assisted by: Marsel Nikolli.

Author Posts
February 9, 2024 at 2:10 pm #15286373

vargaB

Hello, we have decided to delete one of the languages. For individual pages, we are using Rankmath redirections, and they work well, but in this case, the folder /deletedlanguage/ redirection is not working. I would like to redirect the entire pages, products, etc located in /deletelanguage/ to default language home page.
Thank you

February 9, 2024 at 2:12 pm #15286375

vargaB

still need help. Thank you

February 9, 2024 at 4:11 pm #15286963

Marsel Nikolli

Hi,

Thank you for contacting WPML Support, I will be happy to help you.

I would suggest you try using the plugin Redirection (https://wpml.org/plugin/redirection/), or you can try redirecting the /deletedlanguage/ from the .htaccess file.

You can try adding the code:

RewriteEngine On
RewriteRule ^deletedlanguage/(.*)$ / [R=301,L]

*Please replace the "deletedlanguage" with the actual language you want to redirect.

* Note: Please make sure you have a full backup of your website before making any update/changes on your .htaccess file.

Let me know if that works out for you.

Regards,
Marsel

February 14, 2024 at 1:23 pm #15302554

vargaB

The .htaccess did not work, the plugin yes. thank you