Remove Index - PHP in Codeigniter

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 7

Remove index.

php
from URL in
Codeigniter
Why should we remove index.php
As the codeigniter is a PHP framework and it
provides user friendly or Seo friendly URL. So
when we run codeigniter application we have
to write index.php after domain name. So we
can remove that index.php from URL in
Codeigniter using .htacess file.
Steps to remove index.php
 Remove the index.php from config file
 Create .htacess file
 Add Code in .htacess file
Add Code in .htacess file

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
Conclusion
In the above slides u learnt how to remove
index.php from URL in Codeigniter and make
URL of your website human readable and Seo
friendly. 
Reference

http://webtechsecrets.com/remove-index-ph
p-in-codeigniter/
Thank You

You might also like