s22_tech Moderator Von United States Mitglied seit Okt. 2019 s22_tech 12 Feb. 2024 02:33 I have an installation that has stores installed under different subdomains, e.g. aaa.domain.com/store/ bbb.domain.com/store/ ccc.domain.com/store/ I would like to set up the home page at www.domain.com?affiliate_id=100 to capture the affiliate cookie to pass it along to the individual stores. In other words, I'd like a single affiliate cookie that spans all the subdomains. Is that possible? Is this correct? header('Set-Cookie: affiliate_id='. $_GET['affiliate_id'] .'; domain=domain.com; Path=/; Expires='. gmdate('r', strtotime('+6 months'))); }```
tim Founder Von Sweden Mitglied seit Mai 2013 tim 13 Feb. 2024 01:16 Include a leading dot (.) when specifying the domain in the Domain attribute. This indicates it applies to all subdomains. I am uncertain if "domain.com" spans all subdomains and main domain without www? It sounds reasonable that it should.