Removing index.php from url in codeigniter

Follow the steps given below to remove index.php segment from the url of codeigniter.


  1. search for zinfomatic in github and use their .htaccess file
  2. or create a new file inside the CodeIgniter folder (outside the application folder).
  3. name the new file as .htaccess
  4. paste the following code inside the .htaccess file.


  RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php/$1 [L]

 Now remove the index.php segment from your url.


Prev
Next

Comments

Popular posts from this blog

Node.js Cheat Sheet

Codeigniter ! Simple But Powerful

Bootstrap ? What is it ?