More than 800+ satisfied clients and counting, since 2010

Blog

Remove index.php from URL using htaccess

The basic rule to hide index.php from URL is to use  .htaccess file in your root directory.

mod_rewrite must be enable with php and this will work for the php version heigher than 5.2.6

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

php version less than 5.2.6 try this:-

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

Written by

The author didnt add any Information to his profile yet