Welcome Guest, Not a member yet? Register   Sign In
Query String Problem
#1

[eluser]BradEstey[/eluser]
In my routes.php file I have the following:

Code:
$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.
#2

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




Theme © iAndrew 2016 - Forum software by © MyBB