For any queries you can reach us at infovistarindia@gmail.com / WhatsApp us: +919158876092

Remove index.php from URL using .htaccess

Introduction

Remove index.php from URL in CodeIgniter using .htaccess file.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

Before:

http://localhost/blog/index.php/Welcome/about_us

After:

http://localhost/blog/Welcome/about_us