cancel
Showing results for 
Search instead for 
Did you mean: 

Multi website and multi store view with custom base url in magento 2

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

Multi website and multi store view with custom base url in magento 2

I have a magento 2 installed and configured the following:

  1. base website with 1 store view called us_en
  2. eu website with 1 store view called eu_en

I have added nginx configurations to pass MAGE_RUN_TYPE and MAGE_RUN_CODE

For assigning mage_code based on request uri,

map $request_uri $mage_code {
        ~^/us/ us_en;
        ~^/eu/ eu_en;
}

And passing the $mage_code as fastcgi param to magento

fastcgi_param  MAGE_RUN_CODE $mage_code;fastcgi_param  MAGE_RUN_TYPE store;

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

 

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

 

Any pointers?

2 REPLIES 2

Re: Multi website and multi store view with custom base url in magento 2

@welkin_a

Did you reindex Magento after setting up the stores? 

Magento Certified Solution Specialist | Lead Magento developer
If this response was helpful to you, consider giving kudos to this post

Re: Multi website and multi store view with custom base url in magento 2

ya, and also cleared the cache too.