1

Magento Version: 2.3

Webserver: nginx

I have a site which has multiple websites/store set up. I am not able to access the store that is not the default, and any time I go there is redirects me to the default store. I have set the store variables within nginx as fastcgi_params and confirmed that it came through to Magento.

I have tried going as far as hard coding the store within the index.php file by setting the server parameters -

$_SERVER['MAGE_RUN_CODE'] = 'mystore' and $_SERVER['MAGE_RUN_TYPE'] = 'store', and it still redirected back to the primary store.

Also tried this with the full Magento Class, i.e. -

$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = 'mystore';
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = 'store';

The one way that I was able to get multi-store to work was by enabling 'Add Store Code to URLs'.

Is there something that is missing?

Thank you.

Your Answer

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

Browse other questions tagged or ask your own question.