We have created multilanguage for multi website.
On main domain work correct, but after set second domain then impossible open website (on main domain everything is ok).
An error has happened during application run. See exception log for details. Could not write error message to log. Please use developer mode to see the message.
log:
[2019-03-22 14:18:04] main.CRITICAL: No such entity. {"exception":"[object] (Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): No such entity. at /home/zabezcen/domains/zabezcen.pl/public_html/vendor/magento/module-store/Model/WebsiteRepository.php:80)"} [] [2019-03-22 14:18:21] main.CRITICAL: No such entity. {"exception":"[object] (Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): No such entity. at /home/zabezcen/domains/zabezcen.pl/public_html/vendor/magento/module-store/Model/WebsiteRepository.php:80)"} []
update: .htaccess
SetEnvIf Host zabezcen.com MAGE_RUN_CODE=en
SetEnvIf Host zabezcen.com MAGE_RUN_TYPE=website
update2:
For test I deleted from .htaccess
SetEnvIf Host zabezcen.com MAGE_RUN_CODE=en
SetEnvIf Host zabezcen.com MAGE_RUN_TYPE=website
Now, when I enter:
mywebsite.com then redirect to main domain mywebsite.pl ?SID=tc7cmm5bc6t884j77i1gcbdu17
But when I enter mywebsite.com/en/ Then everything works correctly
So now, how to set after open website mywebsite.com redirect to mywebsite.com/en/