How to remove index.php from URL in CodeIgniter using .htaccess


0

In this tutorial we will make code snippet remove index.php from url in codeigniter

Create a .htaccess file in your project root folder and put this code.

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

Before Path :

http://localhost/codeigniter/index.php/Welcome/about

After Path:

http://localhost/codeigniter/Welcome/about


Like it? Share with your friends!

0
Developer

0 Comments