.htaccess - Unable to remove index.php in Codeigniter -


i want remove index.php access controllers directly. however, cannot directly go controller. have use index.php. example: want go http://example.com/my_controller/method instead of http://example.com/index.php/my_controller/method

by way, used test server, not local server xampp. enabled apache mod rewrite in server.

i tried lot of htaccess rules, conditions cannot work it. please me!

this .htaccess file:

<ifmodule mod_rewrite.c> rewriteengine on rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)$ index.php/$1 [l]  </ifmodule> 

my config.php:

$config['index_page'] = ''; $config['uri_protocol'] = 'request_uri'; 

how can go directly?

how verifying mod_rewrite enabled. follow instructions here: how check whether mod_rewrite enable on server?


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -