.htaccess code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
also change in config file:
$config['index_page'] = ' ';
$config['uri_protocol'] = "REQUEST_URI";
mod_rewrite is also enabled. although this code doesn't work.