Jump to content

Sessions with and without www. problems?!


TeddyKiller

Recommended Posts

If I logged in on my site under

www.mysite.com

I can access any page with the www. though I cant access any page without it.

 

If I logged in on my site under

mysite.com

I can access any page without the www. Though I cant access any page with it.

 

How can I fix this problem?

Link to comment
https://forums.phpfreaks.com/topic/198243-sessions-with-and-without-www-problems/
Share on other sites

1A) Redirect non-www. addresses to the www. version

1B) Use consistent addresses on all your pages (eliminates unnecessary redirects, see 1A.)

2) You can set the session.cookie_domain setting so that it matches all host-names/sub-domains of your domain.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.