MyBB Community Forums

Full Version: Cookie issue across different domains.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
I've been having a cookie issue with my forum at www.jweb2.com/forum.php, www.cxr.cc/forum.php, and www.easymybb.com/forum.php it's all the same coding with the same database but I have to login to each site seperately instead of logging into one site and being logged in on the other 2. If I login to each seperately I stay logged in though so I know it is creating a cookie but the cookie is not being read by the other sites.

Cookie Domain: (blank)
Cookie Path: /
Cookie Prefix: jweb2_

Any ideas?
Well it looks like I will have to do some custom coding of the core files which I hate to do. Sad
have you tried these

they work for multiple domains going to the same url, maybe its not what your looking for ?

http://mods.mybboard.net/view/autoset-co...aths-1.1.2

http://mods.mybboard.net/view/autoset-bburl-1.1.2
Different URLs. Sad
It's not easy to have multiple domains like this because the cookie settings are based directly off the URL, so you can only have one set. Even people using those plugins have had problems doing this, you'd be far better off redirecting two of the URLs to one of the others. Having 3 URLs would probably get rather confusing for people too.
Well it's 3 completely different sites sharing the database. I did find a way to do it but there are some security concerns so I guess I'll just keep it the way it is now. Sad
(2010-02-27, 05:18 AM)technoman Wrote: [ -> ]have you tried these

they work for multiple domains going to the same url, maybe its not what your looking for ?

http://mods.mybboard.net/view/autoset-co...aths-1.1.2

http://mods.mybboard.net/view/autoset-bburl-1.1.2

Use both plugin. It's set automatically cookie path/url and bburl - also on different domains. Wink
But that will only set the cookie for that domain and will not set the cookie for all 3 domains. Wink
There are single sign on methodologies across multiple domains, however this is really beyond the scope of what MyBB does.
Never looked at it myself, but maybe something like OpenID might give you some hints.
(2010-02-28, 09:50 AM)KuJoe Wrote: [ -> ]But that will only set the cookie for that domain and will not set the cookie for all 3 domains. Wink

I tested it and it works!

You have 3 domains:

example1.net
example2.net
example3.net

All of them shows the same content (no simple redirect!). By default you can set cookie and domain settings only for one domain (example1.net). But the 2 plugins will set them dynamically.

If you surf to example2.net or example3.net the plugins will set cookie and domain setting dynamically to the stated domain.

Some time ago I used it too. I had 2 domains which shows the same content. Both plugins helped me to set cookie and url dynamically. But beware: You create duplicate content over more than one domain to search engines like google and maybe they will kick you out!
Didn't work. Sad
Pages: 1 2 3