0

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

enter image description here

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/

2

Make sure you've set values for $MAGE_RUN_TYPE and $MAGE_RUN_CODE in your vhost file.

It depends on your website/store configuration, but it could be for example:

$MAGE_RUN_TYPE = "website"

$MAGE_RUN_CODE = "my_second_website_code_from_store_website_table"

| improve this answer | |
  • yes I think you have right and correct way. Can you please check my topic update? I have configured it this way. What should the code look like in .hta? – Sylvester Mar 25 '19 at 20:30

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.