Background of the issue:
I am trying to switch off the 'Use directory for default language' option in WPML because it causes compatibility problems with Litespeed CDN. I need to ensure that old links with '/en/' redirect properly to new ones without '/en/'.
Symptoms:
When I switch off the option and refresh permalinks, all old links with '/en/' get broken and show 404 errors.
Questions:
How can I automatically generate 301 redirections from old permalinks with '/en/' to new ones without '/en/' using WPML?