site with www and without www is not acting same for baseurl in codeigniter
snippet in htaccess

site with www and without www is not acting same for baseurl in codeigniter

user4578

    if(strpos($_SERVER['HTTP_HOST'],'www')===false)
    {
        $config['base_url'] = 'http://example.com';
    }
    else
    {
        $config['base_url'] = 'http://www.example.com';
    }