Thursday, August 22, 2013

How to remove index.php from CodeIgniter


create .htacess file in project base folder ie http://localhost/project/

Add this code
RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php/$1 [L,QSA]

config.php

$config['uri_protocol'] = 'REQUEST_URI';
$config['index_page'] = '';