Skip to main content

Why is "www.example.com” not the same as "example.com”?


I have a website. If I login in the domain of this format http://example.com and then change my address to http://www.example.com , i find my account is not logged in. If I change the address to http://example.com , I find my account is logged in.



I contacted my host, they told me its a programming issue.



How can i solve this issue so both addresses represent same access/session/cookies?



I'm using PHP & MySQL


Source: Tips4allCCNA FINAL EXAM

Comments

  1. How can i solve this issue so both addresses represent same
    access/session/cookies?


    You have to set the domain path of your cookie like this to make it available on all subdomains: (www is a subdomain):

    .domain.com

    ReplyDelete
  2. It is not same..
    usually you can go to www.example.com just with writing example.com to your browser, but your browser added www to your url..
    so basicly it is not same

    ReplyDelete

Post a Comment

Popular posts from this blog

Slow Android emulator

I have a 2.67 GHz Celeron processor, 1.21 GB of RAM on a x86 Windows XP Professional machine. My understanding is that the Android emulator should start fairly quickly on such a machine, but for me it does not. I have followed all instructions in setting up the IDE, SDKs, JDKs and such and have had some success in staring the emulator quickly but is very particulary. How can I, if possible, fix this problem?