I have a login page which exist in my main domain. I want to set session some specific subdomain.
Suppose My login page is example.com
After successfully login my page will go to cms.example.com
or admin.example.com
. Session should store this three example.com
, cms.example.com
and admin.example.com
not other subdomain.
Currently I got session only my example.com
but I am unable to get any session in above 2 subdomain.
I found some related question and answer here Allow php sessions to carry over to subdomains | Set session cookies for specific subdomains but this is set for all domains. Here is problem because I have some other subdomains like user.example.com
, studio.example.com
, demo.example.com
etc.
How to set session for specific domain and subdomain?