[thelist] PHP Sessions and URL's

Jeremy Keith jeremy at adactio.com
Thu Mar 8 18:32:24 CST 2001


> I have a two domains that need to redirect to www.domain.com, so my sessions
> will work correctly. . . Anyone have sugguestions?

My thought when faced with this problem was to redirect to the "www" domain.
In the end, I ended up simply setting two cookies, one with domain.com,
www.domain.com.

It worked for me but it was for a very simple, unimportant little cookie so
I didn't spend two long thinking about possible disadvantages to this
technique.

If you want to see the cookie in action, go to http://adactio.com and check
your cookie file afterward for cookies from "adactio.com" and
"www.adactio.com" (when you choose a "flavour" for the site, it gets stored
in these two cookies).

I'm very new to PHP though, so there may well be a much simpler solution.

I have it in the back of my head that some older versions of Netscape only
accept cookies when the domain contains two dots so www.domain.com would
work but domain.com wouldn't. Can anyone confirm/deny this?

Jeremy Keith

a d @ c t i o   http://adactio.com/






More information about the thelist mailing list