Reputation: 321
I have a site at GoDaddy. You may access it using a www prefix or not. It works fine either way unless you happen to hit a link that uses/does not use the prefix. Then the session disappears. Is www.example.com supposed to be the same as example.com? If not, how do I require the use of one or the other?
Upvotes: 2
Views: 76
Reputation: 480
Sessions are based on cookies, and cookies are bound to a specific domain. www.abc.com is a subdomain of abc.com (In some cases, you might not even be the owner of both).
I would force webserver to add a www prefix (with .htaccess if you are using Apache: Example here)
Upvotes: 2