setting up codeigniter can be nightmare with slightest mistake in .htaccess commands. I am pasting htaccess code which works perfectly for quick reference.
RewriteBase /myapp
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php/$1 [L]