#StackBounty: #magento2.3 #store-view #multidomain #store-switcher #language-switcher "The store that was requested wasn't fou…

Bounty: 50

Everytime I’m switching from the English store view to the Italian’s one and viceversa, it takes me to the equivalent homepage (no matters where I am) and it throws this error:

The store that was requested wasn't found. Verify the store and try again.

Here’s my setup:

  • Magento 2.3.4 (fresh installation, self hosted)
  • Nginx reverse proxy that serves Apache webserver
  • Varnish cache 6.1.1
  • 1 website, 1 store, 2 store views
  • For each store view one different domain (English store view –> example.com, Italian store view –> example.it)
  • I added on top of main .htaccess these env:
    SetEnvIf Host ^(.*).example.com MAGE_RUN_CODE=en
    SetEnvIf Host ^(.*).example.com MAGE_RUN_TYPE=store
    SetEnvIf Host ^(.*).example.it MAGE_RUN_CODE=it
    SetEnvIf Host ^(.*).example.it MAGE_RUN_TYPE=store
    

Recap: If, for example, I’m on example.com/my-beautiful-product.html [English store view] and I’m switching to the Italian store view, it takes me to example.it and it shows that error (“The store that was requested wasn’t found. Verify the store and try again.”) instead of take me on example.it/my-beautiful-product.html without any errors.

Any Ideas?


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.