article

Sunday, June 9, 2013

Removing index.php from URL in Codeigniter

Removing index.php from URL in Codeigniter

Go to your root folder: create .htaccess

# Customized error messages.
ErrorDocument 404 /index.php
 
# Set the default handler.
DirectoryIndex index.php
 
# Various rewrite rules.
<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?/$1 [L,QSA]
</IfModule>

Related Post