WPML htaccess Redirect Rule After Switch From Query Parameter To Language Directory

Aleksandar WordPress, WPML Leave a Comment

You’ve been using the WPML setting that adds a query parameter at the end of a URL to select the language
and now you want to switch to the setting where the languages are in directories?

From this setting: Language name added as a parameter (https://www.example.com?lang=fr – French)
To this setting: Different languages in directories ((https://www.example.com/ – English, https://www.example.com/fr/ – French))

Then the below redirect rule is for you. It safely redirects all old URLs to the new ones, after you did the switch.

 

Leave a Reply

Your email address will not be published. Required fields are marked *