Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Sessions/cookies

Asked Modified Viewed 3,379 times
W
wayno
W
wayno 10
  • Junior Member, joined since
  • Contributed 13 posts on the community forums.
  • Started 3 threads in the forums
  • Started this discussions
asked
Junior Member

Hi there,

I have had a problem with the sessions/cookies in php-fusion for a while now.
If you log in to www.mysite.com and then click on a link redirecting you to mysite.com (without www), you are logged out again. I spoke with my host about this, and they said that it is a bug/mistake in the system I use (php-fusion 7). And then I realised that the problem may have been there all the time :(

Can I fix this by changing the cookies in maincore.php and setuser.php?
If I can't, I know there is a method to solve the problem by forcing the www-prefix on the address no matter what you write. But how do I do this? :) Thanks.

/wayno
0 replies

4 posts

G
googlebot
G
Visit the new home of the merge between Hacking Vs. Security and Security Override!
My copyright removal has been switched over from HvS to SecurityOverride.
  • Senior Member, joined since
  • Contributed 638 posts on the community forums.
  • Started 28 threads in the forums
answered
Senior Member

This is not a bug, rather the cookies that are set with www. do not work without www. and vise versa. This is the case with many hosts, including Netriox, the hosting service that this website is hosted by.
0 replies
W
wayno
W
wayno 10
  • Junior Member, joined since
  • Contributed 13 posts on the community forums.
  • Started 3 threads in the forums
  • Started this discussions
answered
Junior Member

Ninos > And how many CMS's do you know? I would call it a bug/error, yes.

Josso > Thanks :) Should I just put this file in the root-folder (of php-fusion)? And what if I want to redirect to www.mysite.com instead of just mysite.com? It's a matter of taste :)
0 replies
J
Josso
J
Josso 10
–––
Without faith, nothing is possible. With it, nothing is impossible
  • Senior Member, joined since
  • Contributed 309 posts on the community forums.
  • Started 1 thread in the forums
answered
Senior Member

Make a .htaccess file with this contents:
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,NC,L]

And every time you go to www.mysite.com it'll redirect you to mysite.com :)

That should solve your problem. ;)
0 replies
N
Ninos
N
Ninos 10
  • Member, joined since
  • Contributed 58 posts on the community forums.
  • Started 11 threads in the forums
answered
Member

I know this isn't useful and hardly what you need to hear, but I can't think of any CMS's in which the cookie works for both www. and without.

No, it isn't a bug either.
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 4 posts
  • Votes 0 votes
  • Topic users 4 members

4 participants

J
J
Josso 10
–––
Without faith, nothing is possible. With it, nothing is impossible
  • Senior Member, joined since
  • Contributed 309 posts on the community forums.
  • Started 1 thread in the forums
W
W
wayno 10
  • Junior Member, joined since
  • Contributed 13 posts on the community forums.
  • Started 3 threads in the forums
  • Started this discussions
G
G
Visit the new home of the merge between Hacking Vs. Security and Security Override!
My copyright removal has been switched over from HvS to SecurityOverride.
  • Senior Member, joined since
  • Contributed 638 posts on the community forums.
  • Started 28 threads in the forums
N
N
Ninos 10
  • Member, joined since
  • Contributed 58 posts on the community forums.
  • Started 11 threads in the forums

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet