title: Magento multi-store indexed links find 404 page when browser has previous history with site
body: <p>I have a Magento site with 6 different stores running.  5 are set as POA and 1 (domestic) is set as default shopping cart facility.  The root domain has it's own PHP page (non mage) that references each store directly at /subdomain/index.php/?___store=storename/.  The first five are set up on a subdomain at /commercial/storename and the last is set to /domestic/storename</p>
  
  <p>I have setup a manual store switcher in the header at the top of every store using jQuery that references each stores address /subdomain/index.php/?___store=storename/ directly inside the subdomain.</p>
  
  <p>The problem I am having is periodically, and regularly, we are experiencing 404s. When the user visits a store (e.g. automotive), switches to another (e.g. mining) and then tries to view a page on the previous store (automotive), the URL points to the right page but the store theme displayed is the 2nd stores.  These 404s can also occur through direct links when a page is indexed in Google and AdWords.</p>
  
  <p>Session lifetime is set to 3600 and all stores have been setup as subdomains. The sixth 'domestic' store is a separate Mage install but is part of the switcher problem.</p>
  
  <p>Any help would be greatly appreciated.  Domain is levanta dot com dot au.</p>
  
  <p>Cheers.</p>
  
  <p>EDIT:  After some checking in the system log I have found the following error.</p>
  
  <p>2012-08-27T02:34:14+00:00 ERR (3): Notice: Undefined index: httponly  in /home/levantan/public_html/www.levanta.com.au/commercial/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 90
  2012-08-27T02:34:14+00:00 ERR (3): Notice: Undefined index: secure  in /home/levantan/public_html/www.levanta.com.au/commercial/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 92
  2012-08-27T02:34:14+00:00 ERR (3): Notice: Undefined index: domain  in /home/levantan/public_html/www.levanta.com.au/commercial/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 94</p>