My version of codeigniter is older than the current one. then .... But follow the example:
change your htaccess to:
<IfModule mod_rewrite.c>
RewriteEngine On
# Remove /index/
RewriteRule ^(.*)/index/?$ $1 [L,R=301]
# Remove trailing slashes (prevents duplicate SEO issues)
RewriteRule ^(.+)/$ $1 [L,R=301]
# Removes access to the system folder by users.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php/$1 [L]
# If not a file or directory, route everything to CI
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [L]
# RewriteRule ^(.*)$ index.php/$1 [L] # This is an alternative
</IfModule>
In your config:
$config['base_url'] = "http://www.seusite.com/";
# or use $config['base_url'] = "";
$config['uri_protocol'] = "REQUEST_URI";
$config['index_page'] = '';
and in your Routes: ( link )
$route['default_controller'] = 'welcome';
$route['product/(:any)'] = "tuaconfig/action";
$route['404_override'] = "";
If your version is the current one, I've seen it in the current documentation ( link ) and following it:
In the framework root:
application/
assets/
system/
.htaccess
index.php
Then change the application / config / config.php file:
$config['index_page'] = "index.php";
$config['index_page'] = "";