how to remove index.php in my URL |
Dear All
i don't want to show index.php in URL. how can i call my controller without calling index.php. for example i want call my controller like ... http://localhost/CodeIgniter-3.0.0/HomeController instead of http://localhost/CodeIgniter-3.0.0/index...Controller somebody give following .htaccess file but it's not working. it shows 500 internal error. ------------.htaccess--------------- RewriteEngine on RewriteCond %(REQUEST_FILENAME) !-f RewriteCond %(REQUEST_FILENAME) !-d RewriteRule .* index.php/$0 [PT,L] ---------------------------------- looking forward Thanks in advance
09-03-2015, 03:16 AM
(This post was last modified: 09-03-2015, 03:17 AM by freddy. Edit Reason: change code )
here is is mine
Code: RewriteEngine On then goes to your config/config.php find Code: $config['index_page'] = 'index.php'; change to be Code: $config['index_page'] = '';
Same as previous post but here are the docs for it:
http://www.codeigniter.com/userguide3/general/urls.html PS You have () instead of {} in your version.
500 is a server error not a CI error, check your server setup.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
If you didn't know how to do this, you might want to give the user guide a thorough reading since it's covered in there. I'm sure there's a lot of other things you are unaware of, which would probably be very helpful.
|
Welcome Guest, Not a member yet? Register Sign In |