Saturday, March 31, 2012

Session values across subdomains

Is it possible to keep sessions between subdomains?
I.e
If I have a site "shop.com" and when user acess his personal page it's
"secure.shop.com"
Is it possible to share the session values between these two?
Why I ask is because the hosting company gives a discount on SSL
certificates if I put it at secure.shop.com instead of the entire site
and since I only need checkout and personal info pages to be secure I
was thinking that I could put that info in the secure.shop.com domain
but I am worried I will loose session info like cartid, userid and
such..
Regards,
Danielit depends. to share the session cookie, you override the domain in the
session cookie, pretty simple. if secure.shop.com and shop.com are the
same site then you are done. if they are different sites and you use
inproc session, then you will need some way to pass session data from
one site to another (say a web service).
-- bruce (sqlwork.com)
daniel.westerberg@.ruilong.se wrote:
> Is it possible to keep sessions between subdomains?
> I.e
> If I have a site "shop.com" and when user acess his personal page it's
> "secure.shop.com"
> Is it possible to share the session values between these two?
> Why I ask is because the hosting company gives a discount on SSL
> certificates if I put it at secure.shop.com instead of the entire site
> and since I only need checkout and personal info pages to be secure I
> was thinking that I could put that info in the secure.shop.com domain
> but I am worried I will loose session info like cartid, userid and
> such..
> Regards,
> Daniel

0 comments:

Post a Comment