Category Archives: Codeigniter

CodeIgniter – accessing $config variable

To access the variables defined in the applocation/config/config.php in the other places in your application,

for example I have declared on config item called ‘api_key’  in our config file

to access this in your controller or views


Remove index.php from Codeigniter url

To remove “index.php” from codeigniter url

Open application/config/config.php file and look for following section in the file

Remove the index.php and save the file

Now create an .htaccess file and paste  following lines

Save this file into root directory of your project, after creating this file restart your web server.