I have setup Magento multisite. I tried both these options:

  • Subdomain install, in htaccess with SetEnvIf I checked the domain and If domainx then runcode = site2
  • Subfolder install, created a subfolder on my Magento directory called 'site2', copied htaccess and index.php to that dir and changed vars so the correct website is runned by Magento.

This both works. But, it only works for the frontend.

What I want now is to have 2 backend logins, like this:

  • mysite.com/admin
  • shop2.mysite.com/admin (or via subdirectory, e.g.: mysite.com/admin and mysite.com/site2/admin)

My guess is I cannot login via /site2/admin/ because the cookies cannot be set for that domain. So I also set the session cookie path in Magento for site2 to /site2 so it sets the cookie for the correct dir, but I`m not sure if this is nessecary.

I am able to show the admin screen for both url's, but when I log into Magento via the /site2/admin/ url it redirects me to mysite.com/admin and I`m not logged in.

Thanks in advance!

EDIT: By setting my default cookie path to / and setting my cookie domain to mysite.com I am now able to login from both domains. However, the URL still changes to mysite.com/admin whilst I want it to stay site2/admin/

1 Answer 1


you cannot have the admin at 2 different urls.
The admin is actually a store view. And it obeys the same rules as any other store view. You can only have one url mapped to it, and the links are generated using one base url.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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