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

 Create a .htaccess file in root folder and add 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

Comments

Popular posts from this blog

Codeigniter Pro Level Tips and Tricks

Login with Facebook in CodeIgniter

PHP - File Uploading