Removing index.php from URL in Codeigniter it’s an easy task to do.
Most of the guys don’t wanna see the index.php in the middle of an URL. Here is the way to remove the index.php from URL
Step1
Create a .htacess file in the root folder and paste the below code
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
Step 2
Go to config.php file in config folder and remove the index.php from $config[‘index_page’] = ‘index.php’;
After that it will look like $config[‘index_page’] = ”;
All set, please check your url ,
http://example.com/listing/files It works!
- Just want to thank us? Buy us a Coffee
- May be another day? Shop on Amazon using our links.
Your prices won't change but we get a small commission.
spotify.com says
Just want to say your article is as surprising.
The clearness for your publish is simply nice and that i can suppose you’re
a professional in this subject. Well together with your permission allow me to take hold of
your RSS feed to keep updated with approaching post.
Thank you 1,000,000 and please keep up the gratifying work.