This thread is resolved. Here is a description of the problem and solution.
Problem:
The client is experiencing an issue where accessing a URL with a language parameter (e.g.,
https://www.campmontana.ch/food/?lang=fr
) does not result in a 404 error, even though the 'Different languages in directories' option is enabled in WPML. Instead, the page is displayed in the default language.
Solution:
We have confirmed that the behavior observed is expected when 'Different languages in directories' is selected in WPML settings. WPML is designed to interpret URLs with language parameters as an attempt to access the page in the default language, not following the directory structure. To manage this and potentially redirect to a 404 page, we recommend using redirection plugins such as Redirection, Smart Custom 404 error page, or Yoast SEO. These plugins can help customize the URL behavior and manage redirects within WordPress.
If this solution does not seem relevant to your situation, please feel free to open a new support ticket here.
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 3 replies, has 3 voices.
Last updated by 12 months ago.
Assisted by: Mateus Getulio.