PHPBuilder: Implementing Cross-Domain Cookies

PHPBuilder: Implementing Cross-Domain Cookies


November 30, 2000

"The cookie specification says that any cookie set for one domain, must not be sent to any other domain. Therefore, if you set a cookie in your user's browser on one domain, that cookie will not be available on any other domain. This is a big problem, if you want your users to log in on one of your sites and still be logged in on your other domains."

"... By using the combination of variables and apache rewriting, cross-domain cookies can be implemented in a simple fashion. In order to maintain the system, your coders need to do nothing more than use the domain variables whenever they link across domains. Links within domains do not need to be modified, as the cookie will work properly."