Query String Problem

In my routes.php file I have the following:

$route['search'] = 'search';
$route[':any'] = 'home';

I have $config['enable_query_strings'] = TRUE; set in my config.php file.

Now when someone goes to http://www.whatever.com/search?q=query it always loads the home controller.

How do I get CodeIgniter to remove "?q=whatever" when it looks for the correct route?

This is a particularly huge problem when users come in from Google Adwords, because it places a "?gclid=" query string on every URL for tracking. I would just want it to be ignored by the routing.

Nevermind... changed $config['uri_protocol'] = "AUTO"; to $config['uri_protocol'] = "PATH_INFO"; ... fixed everything.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.