Created
July 19, 2018 23:51
-
-
Save sashas777/ee1d771f7c5c9c0d8477bb232a1c54da to your computer and use it in GitHub Desktop.
Magento 2 Cloud Multistore where store set by url /{{store_code}}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Two steps: | |
1. Setup Multistore at the admin where each store url are the same | |
2. Create pub/{{store_code}}/index.php | |
<?php | |
require realpath(__DIR__) . '/../../app/bootstrap.php'; | |
$params = $_SERVER; | |
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = '{{store_code}}'; | |
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = 'website'; | |
$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $params); | |
$app = $bootstrap->createApplication('Magento\Framework\App\Http'); | |
$bootstrap->run($app); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment