I\'m using Ubuntu 13 with the following setup for a local codeigniter site.
Apache/2.4.6 (Ubuntu) 5.5.3-1ubuntu2.2 \'CI_VERSION\', \'2.1.2\'
I would try something like:
RewriteRule ^(?!index)(.*)$ index.php?/myvariable=$1 [L]
If you know what GET variable the script is expecting for controllername in localhost/controllername, then in the rule replace myvariable with that variable name.
controllername
localhost/controllername
myvariable