CodeIgniter setup tips
By Rayed
- Fix mod_rewrite to have clean URLs, and get rid of “index.php” part.
- Edit “config/config.php” and change the following:
// Setup your base URL
$config['base_url']="http://rayed.com/ci/";
// No need for index.php
$config['index_page'] = "";
// Remove AUTO and Put PATH_INFO
// this will allows you to pass variables as URL
// segments or Query string "?id=1"
$config['uri_protocol'] = "PATH_INFO";
- Setup your database configuration “config/database.php”
- Auto connect to database, edit “config/autoload.php”:
$autoload['libraries'] = array('database');
- Edit “config/routes.php” to change default controller:
$route['default_controller'] = "users";