Optionally enable standard query string based URLs |
[eluser]garaget[/eluser]
I have been trying to get only ONE of my functions to load with standard query string with no luck. I played with both the config and route files only to come with more errors. If anyone has any suggestions I would appreciate it URL www.your-site.com/class/function?c=controller&m=function route.php Code: $route['class/function?:any'] = "class/function/$1"; config.php Code: $config['permitted_uri_chars'] = 'a-z 0-9~%.:_-?=&';
[eluser]xwero[/eluser]
I think you better convert the query string of the method in a pre_system hook. Code: function get_to_segments()
[eluser]garaget[/eluser]
Thanks XWERO.. You are always here to help us Newbs out. You should change your SN to xHERO.
[eluser]Dam1an[/eluser]
Thanks Xwero, I was wondering how to get a nice, clean combination of URI segments and query strings
[eluser]xwero[/eluser]
the code doesn't mix path segments with query strings. It processes the query string to path segments before it reaches CI. The function is meant to be used when you want your app to have all path urls. If you want to prevent CI from fetching the query string you set the uri_protocol to path_info/orig_path_info/request_uri. When you need the query string in one of your methods you just add Code: parse_str($_SERVER['QUERY_STRING'],$_GET);
[eluser]Thorpe Obazee[/eluser]
Nice. This might be helpful to me someday bookmarked. EDIT: So this thing redirects to the 'correct' path whenever it encounters the query string your looking for. Maybe it should be noted that this only works when you set the uri_protocol to PATH_INFO and ORIG_PATH_INFO.
[eluser]ricick[/eluser]
This is awesome. It really should be in the user guide.
[eluser]ricick[/eluser]
This breaks with the 1.7.2 upgrade under php 5.3 Code: A PHP Error was encountered |
Welcome Guest, Not a member yet? Register Sign In |