0

I was able to stay logged in on multiple subdomains I created for example.com, such as I stayed logged in at a.example.com and b.example.com. But when I try aliasing (CNAME) to example.com of a.example.com, I lose what my current session was.

SESSION_COOKIE_DOMAIN is 'example.com' which probably explains why the current session was not held.

Is there anyway I can alias while holding what my sessions were from example.com since it is suppose to point to example.com in the first place?

I know meetup.com does something like this.

1 Answers1

1

Try placing a "." in front of your domain

SESSION_COOKIE_DOMAIN = '.example.com'

This will assign your session domain to example.com and will persist for all subdomains.

Jonathan Haar
  • 574
  • 4
  • 10
  • My problem is more about aliasing. Such as getting this-site.com to alias to example.com – morningcocoa Apr 12 '13 at 19:28
  • I'm not sure how to do this without running in to cross-site issues. However, I found this thread that may help - its for PHP though. http://stackoverflow.com/questions/1339984/cross-domain-php-sessions – Jonathan Haar Apr 21 '13 at 05:06