my sessions only work with a sub-domain, e.g. www. ,and do not work without that sub-domain.
For example, when a user is logged in.
If the address is n
www.domain.com
and domain.com
are NOT the same website. They are the mirror copy of each other
For this reason, cookies set on domain.com
will NOT be used on www.domain.com
and vice-verse, because it would be unsafe to assume they are the same thing.
You can override this behavior to some extent by allowing the session cookie to work on all subdomains as well as the main domain by setting the php.ini setting session.cookie_domain
to .domain.com