Magento News
magento redirects to another subdomain based on cookie in multi stores
I have a magento store but currently decided to add other stores to separate the inventory and also have a clean catalog so i decided to create stores and host them on sub-domains like electronics.mydomain.com and sport.mydomain.com. i followed this tutorial http://www.crucialwebhost.com/blog/how-to-setup-multiple-magento-stores/ but after it the sub-domains were still redirecting to main domain like www.mydomain.com even though i had done nothing with my .htaccess, i found a way to go about it by opening the index.php in my subdomain directory and adding $_GET['___store']= "STORECODE"; and also in my admin panel i typed .mydomain.com in the cookie field and also prolonged the duration to 1 day.
Voila.. everything is working now perfectly until i realized there was a problem, whenever i visit any of my stores(which is installed on the subdomain) and then try to open my main domain that is the www.mydomain.com, it redirects to subdomain.mydomain.com(which is the url of the last subdomain i checked) but then it works again after clearing cookies, i realized the problem is that magento is saving the current store id in the cookie so when i opens my main domain and the cookie is read, that store is returned and therefore the redirect.
The next problem is whenever i visit any of the stores i see the link as www.subdomain.mydomain.com?SID=sid&__store=storeid,
is there a way i can remove the sid(session ID) and the __store variable to improve my SEO.
here is the link to my site http://welspot.com
Thank you.
This thing is chewing my head all day but is there any better way to go about it
magento redirects to another subdomain based on cookie in multi stores
Possibly Related Posts:
- Database query different results
- Menu highlight in magento under admin
- magento disable a banner on certain category pages or have a banner with multiple links
- Magento, using ACL for frontend. Possible?
- Magento IE-7 Fix In Windows XP
RSS Feed