In my constants.php
file, I have set site root.
define("SITEROOT","http://www.example.com/");
please see for difference in http:// and http://www. in following description.
Now session_start works only if I move from http://www.example.com/index.php to any other page. But if I use http://example.com and tried to echo session details on other page with http://www.example.com/pagename.php, session is not continued.
Is there any way to auto correct url in browser's address bar to http://www.example.com if user uses http://example.com ?