Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 06:28 am EST

Geeklog Forums

Multiple domains for cookie


Status: offline

SCSI_0

Forum User
Newbie
Registered: 10/20/04
Posts: 3
Is it possible to manually set multiple doamins for a cookie? I purchased the .net + .com domains for my site, and just as a backup I would like the user to retain ther cookie related prefs no matter what domain they do to. I have looked at some cookie specs; and all I have seen is info pertaining to subdomains.
www.totaldefiance.net | www.uber-comics.net
 Quote

Status: offline

destr0yr

Forum User
Full Member
Registered: 07/06/02
Posts: 324
I believe you can set the following...

Text Formatted Code
$_CONF['cookiedomain']=$_SERVER["HTTP_HOST"];
 

-- destr0yr
"I love deadlines. I like the whooshing sound they make as they fly by." -- Douglas Adams
 Quote

Status: offline

SCSI_0

Forum User
Newbie
Registered: 10/20/04
Posts: 3
wont $_SERVER["HTTP_HOST"]; just write the cookie depending on what domain they logged in at? in other words it is still doing the same thing. Unless i am mistaken? I want to know if I can specificy multiple domains for the cookie to be valid at. How do other websites with mutiple domains deal with this?
www.totaldefiance.net | www.uber-comics.net
 Quote

SCSI_0

Anonymous
...anyone? ...research pending now.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by SCSI_0: Is it possible to manually set multiple doamins for a cookie?

No. A cookie is only defined for exactly one domain.

bye, Dirk
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
Quote by SCSI_0:I want to know if I can specificy multiple domains for the cookie to be valid at.
Are you talking about using multiple domain names (site1.com, site2.com, etc.) with just one GL site, or are you talking about using multiple TLD's with one Sub Level Domain (site.com, site.net, site.biz)?

In both cases, if you are using only one GL site, you may set up redirects from all of your domain names to just one and deliver the cookie from that one.

If you are talking about multiple sites on multiple domains, then, as Dirk points out, you are out of luck.
 Quote

Status: offline

SCSI_0

Forum User
Newbie
Registered: 10/20/04
Posts: 3
Yes, multiple Top Level Domains (.net .com) with one sublevel. Only one geeklog. Currently my setup is domain.net is parked on domain.com, not redirect. Perhaps the redirect approach may work better. Thank for the suggestion.
www.totaldefiance.net | www.uber-comics.net
 Quote

All times are EST. The time is now 06:28 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content