January 12, 2013

Session out issue in codeigniter

Session out issue in codeigniter

Note: wdwd = websitedesignwebsitedevelopment

In fact CI is managing the session with cookies and when you mention your domain in config file so it creates the cookies with that identity. It is already clear that we can have sub-domains as well. So with www. and without www. cookies will have different identities.

config.php

$config['base_url'] = 'http://www.wdwd.com/';

Changes in .htaccess file assumed

RewriteCond %{HTTP_HOST} ^wdwd.com
RewriteRule ^(.*)$ http://www.wdwd.com/$1 [R=301,L]

Last updated: March 19, 2014