I need to change the Language URL format from parameter (example *.com?lang=en) to direcory (example *.com/en/)
After I change this setting, I want old links automatically to be redirected to the new format.
So if someone enters the old url format .com/contact/?lang=en, he automatically need to be redirected to .com/en/contact/
This does not happen automatically. Can I make a setting for this in WPML? Or can I include rules for that in the htaccess?
Unfortunately, this did not work automatically for me. All links with the 'old' structure, led to the homepage of the main language. There was also the problem that the links in the navigation were converted to the new structure, but not on the pages themselves. Probably because we ourselves put static links in here instead of dynamic ones. Or an incompatibility with Elementor. So problem not solved, but unfortunately for this topic I choose to solve it differently.
For now, I will keep the same link structure, but choose not to have the language selection redirected by the browser, as this caused problems with Google canonical links.