.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
Post a Comment