I am using CodeIgniter for two applications (a public and an admin app). The important elements of the document structure are:
/admin /admin/.htaccess /admin
The cause of the problem was that the server was running PHP using FastCGI.
After changing the config.php to
$config['uri_protocol'] = "REQUEST_URI";
everything worked.