I have a running store on Magento 2 which has multiple websites that I can access in the front end without any problems, for example:
https://siteone.mymagestore.com
https://sitetwo.mymagestore.com
https://sitethree.mymagestore.com
.
.
.
But when I try to access the admin panel in the same way it redirects me to the main store URL, for example:
https://siteone.mymagestore.com/admin -> Redirects to https://www.mymagestore.com/admin
How can I allow accessing the Magento admin panel on URLs like https://siteone.mymagestore.com/admin as well?
I have tried many aspects to solve the problem but nothing seems to help. Any help on it would be highly appreciated.
2
Answers
This can be done by changing adding the following code in MagentoFrameworkUrl
getUrl() function - At the end add
Replace:
With:
Unfortunately, that’s not possible only with Magento at this moment. Magento allows you to specify a custom admin URI (For having your shop on siteX.magestore.com, and the admin on admin.magestore.com for example).
If you need more information, you can check this issue on magento github. This is a incorrect behavior on Magento reported two years ago, confirmed on 2.1, 2.2, 2.3 and not fixed yet.
As a workaround, on the bug report I’ve found this:
You can try to install this module.