I'm having some trouble configuring a multi-site setup for my employer's website.
Our server provider has setup two seperate domains running off the same server and webroot.
I have completed all the requisite steps in the Magento admin panel.
However, when I proceeded to editing the index.php and htaccess files I ran into some issues.
For example:
My index.php currently looks like this:
switch($_SERVER['HTTP_HOST']) {
case 'domain2.com.au':
case 'www.domain2.com.au':
$mageRunCode = 'domain2';
$mageRunType = 'website';
break;
}
$params = $_SERVER;
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = $mageRunCode;
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = $mageRunType;
$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $params);
/** @var \Magento\Framework\App\Http $app */
$app = $bootstrap->createApplication(\Magento\Framework\App\Http::class);
$bootstrap->run($app);
The 2nd domain no longer redirects to the main website. However, it presents the following error in the Exception log:
[2021-04-27 03:18:13] main.CRITICAL: No such entity. {"exception":"[object] (Magento\Framework\Exception\NoSuchEntityException(code: 0): No such entity. at /var/www/html/cyclemotion.com.au/vendor/magento/module-store/Model/GroupRepository.php:70)"} []
I can't seem to find much online about this specific issue.
So I would really appreciate the help if anyone has experienced something similar. :)
Thanks.