vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Make cookies work properly with multiple domains (https://vborg.vbsupport.ru/showthread.php?t=33044)

James Cridland 12-07-2001 10:00 PM

If your site is available at, for example, http://www.vbulletin.org as well as http://vbulletin.org (one with the www and one without) then your forums will work perfectly under either domain name.

However, if you log on at http://www.vbulletin.org, you won't be logged on at http://vbulletin.org as well, since the cookies held on your machine are different for each domain name.

Further, if you own www.vbulletin.info as well (not the case here), these other domain names will cause problems with cookies as mentioned earlier, and also confuse automatic traffic measurement tools like Alexa and Hitwise.

If you want to fix it, then you'll find a hackette enclosed. (It's one line of code). It will translate any page request on http://vbulletin.org to the same page on http://www.vbulletin.org/

See it working here on VBulletin (installed after I suggested it and it was modified slightly by Firefly to make it a bit easier).

Also see the same code working, albeit not under VBulletin, by going to http://www.virginradio.co.uk (the 'real' address) or http://virginradio.co.uk/ or http://www.virgin-radio.com/ or... etc

Matt 12-08-2001 05:40 PM

OMG! I just installed and am about to test! I hope to God it works as its EXACTLY what I need!!! :) Thankyou!

Modshack 12-08-2001 07:18 PM

Installed and working fine for me, a life saver and very much appreciated.

HM

Tommy Boy 12-08-2001 10:53 PM

Hmmm... I don't want to sound rude, but I'm not sure why it is needed, except for aesthetic reasons. If you want your cookies to work with all your sub-domains and directories, just set the "Cookie Domain" field to ".vbulletin.com" (change to your domain, NOTE THE TWO DOTS!), as explained in the Admin options page. Also, set the "Path to save cookies" field to "/". It is working for me, and I'm using the same cookies in different sub-domains and directories. :)

amykhar 12-08-2001 11:44 PM

Tommy Boy,
Some users just aren't that computer literate, and they follow links on the board pasted by others, and then freak out when told they can't read because they aren't a member. They never look and see that they just need to log in to the "other" domain, they just fire off an email "Why did you ban me?! I can't access the site!". Users are generally paranoid people. This hack just might save the sanity of some poor webmaster somewhere. :D

Amy

bira 12-09-2001 02:55 AM

Amy, Tommy Boy is right though.

If your website is accessible both as http://vbulletin.com and http://www.vbulletin.com, then set the cookie domain to .vbulletin.com in the Admin Control Panel Options page.

This has NOTHING with users being computer illiterate, it's got to do with Admins not doing it right. It doens't make sense to me that you as an admin would prefer to install a hack rather than set the option that already exists in vB correctly.

Wayne Luke 12-09-2001 04:26 AM

It is correct but if you have two disimilar domain names then it will be a great help. For example we not only use www.sitepointforums.com and sitepointforums.com but users can also access it through www.sitepointforum.com and sitepointforum.com (note the singular form of forum). You can't handle this using the cookie options in vBulletin.

I will be using this, Thanks...

Tommy Boy 12-09-2001 06:01 AM

This is true, if you have different DOMAIN names, then installing this hack is the only way to do it. Note however, that the user will be just redirected to the domain name on which he is already logged in...

James Cridland 12-09-2001 10:35 AM

It's more useful for people with (like me) mediauk.com, mediauk.co.uk, mediauk.org and mediauk.info. No amount of crafty cookie programming is going to sort that out, plus third-party traffic checkers will treat these domains as separate sites, therefore making you look worse than you actually are.

Lesane 12-09-2001 11:47 AM

Thanks James, i was waitin' for this hack.. Worked very good. I use www.domain.com & www.otherdomain.com/board.


All times are GMT. The time now is 08:57 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01476 seconds
  • Memory Usage 1,738KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete