How to remove index.php from the url
How to remove index.php from the url.
1. Paste the code in the .htaccess file
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
Note - If you don't see any .htaccess file inside the folder then create by your own and save it as .htaccess
2. Inside the config file do the following changes
$config['index_page'] = 'index.php';
to
$config['index_page'] = '';
3. If the above 2 things not working then apply the 3rd one.
$config['uri_protocol'] = "AUTO";
to
$config['uri_protocol'] = "REQUEST_URI";
So that's it hope you will able to remove the index.php from the url.
Thanks..

Comments
Post a Comment