This is a Magento 2.3.2 CE project

Let's assume url of default storeview is https://www.domain.com/store/es

Url of second storeview is https://www.domain.pt/pt

Language switcher gives error, redirecting to same storeview 404 page... is this a bug or a feature? I understand this url configuration is weird, and it makes no sense using store codes in this case

  • Please check logs and provide more detail here. – Nits Nov 19 '19 at 5:52
  • I would be more worried about upgrading to the latest version than switching languages. – MagenX Nov 19 '19 at 8:54
  • Hello @raul, Are you able to provide your root directory structure? I think you have created the wrong multi-store view. – chirag Nov 20 '19 at 9:22

i have also faced the similar issue last month and this is how i had fixed it.

try the below method hope this will work for you also

I managed to fix the problem by adding following code in .htaccess file:

SetEnvIf Host [domain1] MAGE_RUN_CODE=[website1 code]
SetEnvIf Host [domain1] MAGE_RUN_TYPE=website 
SetEnvIf Host [domain2] MAGE_RUN_CODE=[website2 code] 
SetEnvIf Host [domain2] MAGE_RUN_TYPE=website

let me know if this works for you

  • i have a wired issue, I can view my website by typing emerald.lk, but if i add www emerald.lk in front i am getting an error. Can you please help me to fix it – Mujahidh May 26 at 12:30

Without knowing more details, I had a similar issue and it was a result of having

<referenceContainer name="content" display="false"/>

in the custom layout update section of any category/CMS page. The reason for this is that Magento stores two key template files in the content referenceContainer to keep customer/store data up to date.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.