I want to remove index.php to access my controllers directly. However, I cannot directly go my controller. I have to use index.php. For example: I want to go http://example.com/my_controller/method instead of http://example.com/index.php/my_controller/method
By the way, I used my test server, not local server like XAMPP. I enabled apache mod rewrite in my server.
I tried a lot of htaccess rules, conditions but I cannot work it. Please help me!
This is my .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 I go directly?