Task: Fix redirects on the multilingual version of the website

Fix redirects on the multilingual version of the website

02.09.2026MODX.club

For example, these links return 404:

/en/posts/cmqstcg2l0003lw0q33gesi4g
/en/posts/cmqsnu96e000tml0qsyzh469g

While without the language version everything is fine, meaning these links redirect properly to the new pages:

/posts/cmqstcg2l0003lw0q33gesi4g
/posts/cmqsnu96e000tml0qsyzh469g

Generally, the redirect mechanism is in the haih-agent core, and multilingualism is implemented on some specific websites based on it. However, the fix will most likely need to be done in haih-agent itself, since the locale and the URL without the locale are retrieved from Next.js itself. So even though we won't have a Locale there, we will be able to get the clean URL without the locale. This case has already been described somewhere by us, most likely in vietnamguru.travel