Question

The live URL is http://shop.com. The development/staging URL is http://sub.shop.com. How do I have to set up the cookie domain, so that I can log into both admin areas without any interdependencies? I tried the following cookie domain settings, but none of them worked:

Live cookie domain: .shop.com
Dev cookie domain: .shop.com
Result: Live login does not work.

Live cookie domain: shop.com
Dev cookie domain: .shop.com
Result: Logging out from one admin area means that you are also logged out from the other admin area.

Live cookie domain: shop.com
Dev cookie domain: sub.shop.com
Result: Dev login does not work.

Live cookie domain: .shop.com
Dev cookie domain: sub.shop.com
Result: No login works.

Live cookie domain: shop.com
Dev cookie domain: .sub.shop.com
Result: Dev login does not work.

Live cookie domain: .shop.com
Dev cookie domain: .sub.shop.com
Result: No login works.

Of course, I have disabled the Magento cache and I clear the cookies in my browser before trying each setting.

Was it helpful?

Solution

This looks pretty much like the login issue described by Phillip Jackson.

An adminhtml cookie must not be valid for more than one installation. If you can, use separate second-level domains for each of the sites or access the live admin area via subdomain.

OTHER TIPS

My preferred setup is this

Live cookie domain: example.com
Dev cookie domain: test.example.com

However, it seems to work best if the live domain is not a "parent" of the dev domain, i.e.

Live cookie domain: www.example.com
Dev cookie domain: test.example.com
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top