Wednesday, September 24, 2014

How To Remove Index.php from Codeigniter URL


Step 1: 

Create a .htaccess file in the root directory of your project.

Step2: 

Paste the following code to that file and save the file:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]

Step 3: 

Remove The .htaccess file from your project_name/application directory.

Finally you are done!