Skip to content
WJunction - Webmaster Forum

Fix the cookie problem in vB

Status
Not open for further replies.
Ok, I've seen many people are facing the problem of cookies with their forums. I also had that problem on my site and just figured out the reason. The reason is when you login on some site like http://domain.com it loads the cookie for http://www.domain.com
So when you click on the banner it redirects you to the correct location and everything is fixed and you can see your self logged on.

So how to fix this?

Here is the solution:

Method #1

1) Go to http://www.site.com/admincp/index.php
2) Find vBulletin Options (Click on vBulletin Options in the table)
3) Find "Cookie Domain"
You need the first setting only
This option sets the domain on which the cookie is active. The most common reason to change this setting is that you have two different urls to your forum, i.e. example.com and forums.example.com. To allow users to stay logged into the forum if they visit via either url, you would set this to .example.com (note the domain begins with a dot.
4) In Suggested Settings Change ".site.com" to "blank"

And the problem should be solved. :D

vbtut1.png


Method #2

If the above method doesn't work then connect to your site via FTP
In your site root folder find ".htaccess"
You have to change last three lines

Make it

# Redirect non-www to www
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule (.*) http://www.YOURDOMAIN.COM/$1 [R=301,L]
Note: In the above quote, change YOURDOMAIN.COM to of course your domain.

It will 100% work


This tutorial is totally written by Royal King. A token of appreciation will make me happy :):)
 

5 comments

The cookie probem. When you try to login your site it logs you in but you see yourself as a guest.

Added more info in the main post

Ok, I've seen many people are facing the problem of cookies with their forums. I also had that problem on my site and just figured out the reason. The reason is when you login on some site like http://domain.com it loads the cookie for http://www.domain.com
So when you click on the banner it redirects you to the correct location and everything is fixed and you can see your self logged on.

So how to fix this?

Here is the solution:
 
Ok the cookie that logs you out gotcha ;) kept logging me out on my friends forum: forum.xxx.tld
xxx.tld/forum

both were using the same db. And all the links were pointed to a diff site had to log into both sometimes :( Thanks tho i will tell him
 
# Redirect non-www to www
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule (.*) http://www.YOURDOMAIN.COM/$1 [R=301,L]

My problem is still here. People can not use posters on my site.
freshwap.net don't have this redirection to www and posters work on that site.
I added u on my msn
 
Status
Not open for further replies.

About the author

R
Active Member · Joined
3,899
Messages
3
Reactions
38
Points

Advertise on WJunction

Reach 1000's of webmasters, hosts & affiliates. Banner & sponsored-thread slots available.

Contact us
Back
Top Bottom