I have set up 2 stores under one Magento installation using this method:
Each store has it's own URL ie. [mainstore.com
...] and [secondarystore.com
...] (add on domain in cpanel)
If I navigate to to mainstore and then switch to secondarystore using the store switcher everything works as expected. I can log in on the secondary and remain there.
The problems arise if I navigate directly to secondarystore in the beginning. If I do this and then try logging in I get automatically redirected to [mainstore.com
Does anyone know why things only work correctly if I navigate to [mainstore.com
...] and then switch to the secondary store?