Tag Archives: codeigniter xampp htaccess

Codeigniter Install


Codeigniter Install : Steps to install Codeigniter.


Step by Step Codeigniter Installation Process

1. Download Latest Version 3.0.0 : Download Zip
2. Unzip it at your server in folder “codeigniter”. for example : xampp/htaccess/codeigniter

3. Now go to – application/config/config.php Here add base url ie. Base path of your application directory.

For example :

$config['base_url'] = 'http://localhost/codeigniter';

4. Now to go the : application/config/database.php Add database settings here :

For Example :

$active_group = 'default';
$query_builder = TRUE;

$db['default'] = array(
	'dsn'	=> '',
	'hostname' => 'localhost',
	'username' => 'root',
	'password' => '',
	'database' => 'your_database_name',
	'dbdriver' => 'mysqli',
	'dbprefix' => '',
	'pconnect' => FALSE,
	'db_debug' => TRUE,
	'cache_on' => FALSE,
	'cachedir' => '',
	'char_set' => 'utf8',
	'dbcollat' => 'utf8_general_ci',
	'swap_pre' => '',
	'encrypt' => FALSE,
	'compress' => FALSE,
	'stricton' => FALSE,
	'failover' => array(),
	'save_queries' => TRUE
);


5 . (Optional) : Remove Index.php from url

Create a .htaccess file at the root of the application for example at : xampp/htaccess/codeigniter – add here .htaccess file

Add the following code in the .htaccess file :

DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php?/$1 [L,QSA]

6. You are done : Now your application is ready : Hit the url : http://localhost/codeigniter you will see default welcome message

Demo»
Download Demo»