0

I have a magento 2 installed and configured the following:
1) default website with 1 store view called us_en
2) eu website with 1 store view called eu_en

When I change base url to store view like domain_name/us/en or domain_name/eu/en that store view fails to load, even the cms pages located in http://localhost/about_us not loading.

I suspect I am missing a step with respect to magento router.

Any pointers?

0

check this guide https://www.cloudways.com/blog/create-and-configure-multistore-magento-2/ can help you with your setup.Did you make changes in index.php and .htaccess file?

  • No, I have not made any changes to index.php or .htaccess. But I am passing MAGE_RUN_CODE and MAGE_RUN_TYPE variables through nginx configuration file. – Alagunambi Welkin Feb 24 '17 at 8:34
  • @AlagunambiWelkin Did you solve it? Having the same struggle right now – Johnny Longneck Mar 2 '18 at 14:18
  • If you're running nginx + php-fpm the MAGE_RUN_CODE and MAGE_RUN_TYPE from your nginx configuration will arrive in php as REDIRECT_MAGE_RUN_CODE and REDIRECT_MAGE_RUN_TYPE. You'll have to solve this in index.php as there is no workaround. However, if you want to run both stores on the same domain you should use the answer provided by @akgola – Vincent Hornikx Apr 16 at 17:41
0

You need to change settings from admin section:

Go to admin->store->configuration->General->Web and in

Url Options setting enable Add Store Code to Urls to Yes

Now Clean all cache.

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.