[eluser]efishant[/eluser]
So I'm facing an interesting problem. Our website is tailored for mobile users. Some carriers force append query strings to the end of their user's page requests. Because of this, we need a solution that allows us to effectively ignore the query strings. Below are a couple of constraints that I'm forced to work with. (please don't start a discussion as to why we have these constraints
1. We can't use .htaccess or edit the .conf file.
2. We definitely can't enable query strings in the config.php file
Here's what I've tried so far:
Code:
$route['(.*)\?(.*)'] = "$1";//tried with and without the escape char
However, the outcome is the same with or without this route. Here are a couple of scenarios I'm seeing. (note: I have a default method for my controllers, so my test URLs only contain the controller name)
1. controller?
- the controller loads without any problems
2. controller?this, controller?this=, controller?this=that, controller?this=that&
- 404 page is returned
3. controller?this=that&x;, controller?this=that&anystring=combination
- The controller loads without any problems.
Any ideas as to how I could ignore the query string so that ?(.*) is ignored completely by CI? I can use anything within CI's domain; hooks, routes etc.
Thanks!