Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.