php - Set $_SESSION to two URLs/Domains -
is possible have set $_session available on 2 urls/domains? same im using .htaccess re-write part of domain:
rewritecond %{http_host} ^pagefor\.local$ [nc] rewriterule ^([a-za-z0-9-.]+)$ http://pagefor/$1.local [l,r] rewriterule ^([a-za-z0-9-.]+).local$ index.php?site=$1 [nc,l]
the above rewrites url if following occurs http://pagefor.local/{username}
http://pagefor/{username}.local
. works fine, although when $_session set on http://pagefor.local
same $_session not available on http://pagefor/{username}.local
.
i thought $_session available both, seeing same domain? effective way $_session set both? thankyou
php sessions rely on cookies (phpsessid cookie in particular). cookies assigned domain name, means browser not reveal cookie set 1 domain another.
Comments
Post a Comment