0

How to restrict php cookie to parent domain and one sub domain?

Having 2 subdomains stage.example.com & secure.example.com.

Need to aloow the cookie set on parent domain to secure.example.com alone, but restrict cookie from stage.example.com.

user996581
  • 145
  • 3
  • 7
  • possible dup: http://stackoverflow.com/questions/348282/php-cookie-domain-subdomain-control – acobster Jun 05 '16 at 17:29
  • so Cookie::forever('timezone', $timezone, time()+86400*30, '/', '.example.com'); will do the trick for me? (I dont want parent site cookies to enter into stage.example.com) – user996581 Jun 05 '16 at 17:34

0 Answers0