“Since CodeIgniter does not utilize GET strings, there is no reason to allow” GET variables, the CodeIgniter User Guide informs us.
Unfortunately, occasionally there is a reason to use those variables—in my case, an in-house authentication program interfered with POST requests made by Javascripts—and it’s not entirely obvious how to make them available in your CodeIgniter app. The Guide seems to suggest enabling query strings, but while that gives you access to the $_GET array, it also cripples your existing URLs—using “query strings” essentially means choosing controllers and methods to execute using GET variables exclusively, what I usually see called “messy URLs.”
The solution is (relatively) simple, but not immediately obvious. I found the solution in this forum post (hopefully it’ll be more visible here). Add these settings to your applications config.php:
$config['uri_protocol'] = "PATH_INFO";
$config['enable_query_strings'] = TRUE;
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-?=+&;';
This should give you an app that uses URI segments to map requests to controllers, but can also pull an occasional argument out of the $_GET superglobal, using the more-or-less generic, universal .htaccess settings I “borrowed” from Textpattern:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>












