Configurasi base_url Codeigniter Otomatis

1. Buka applicaion/config/config.php file.

2.  ganti baris berikut
$config[‘base_url’] = ”;

menjadi
$path = “http://” . $_SERVER[‘HTTP_HOST’] . str_replace(basename($_SERVER[‘SCRIPT_NAME’]),””,$_SERVER[‘SCRIPT_NAME’]);
$config[‘base_url’] = $path;