[eluser]Clooner[/eluser]
[quote author="amosmos" date="1280766672"]
Well then your advise is not good to me, I have to change the "uri_protocol" to "REQUEST_URI" because that's the only way it can work on GoDaddy hosting. By doing this, I can no longer use any query string variable at all, or else I get the "The URI you submitted has disallowed characters" error.
So again, WanWizard, can you help me out? I want to understand how I should make CI ignore the "?" character and what follows it, so that I can use your solution...
Thanks,
Amos[/quote]
What are you talking about? Simply change the config uri protocol to REQUEST_URI and add to the allowed characters ?=& which you will have to do now because you use request_uri and I am sure it will work that way.
config
Code:
// for this difficult host :P
$config['uri_protocol'] = "REQUEST_URI";
// add allowed types
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-?=&';
// leave it at disabled
$config['enable_query_strings'] = FALSE;
controller
Code:
//rebuild the get
parse_str($_SERVER['QUERY_STRING'],$_GET);
When I said that you don't need to change the config file I meant that it usually works out of the box
This is the way to go! no ugly code changes or hooks and again usually this works by default!