For reliable use of query strings I’ve found you need to do 3 things
- In
application/config/config.php
set$config['enable_query_strings'] = true;
- Again in
application/config/config.php
set$config['uri_protocol'] = "PATH_INFO";
- Change your .htaccess to remove the ? (if present) in the rewrite rule
I use the following
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]