Please wait for 15 seconds...

Saturday 28 July 2012



Codeigniter is very flexible PHP framework and its learning curve also is very flexible. And it is the reason why it got so popular very quickly. As Codeigniter is getting more popular developers want few changes in it. One of the most asked question, for codeigniter, is how to remove index.php from URL in codeigniter. Here I am explaining how to do it.

First copy .htaccess file from application folder and paste it on to the root directory.

Now open it in notepad or notepad++. Not in MS-Word or Wordpad.

Copy below code and paste it in newly created .htaccess file.


.htaccess Code


SetEnv APPLICATION_ENV development
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(.*)/?$ index.php?route=$1 [NC]

Now save the file and enjoy Codeigniter...

Posted by Atul

0 comments:

Post a Comment

Techsirius on Facebook