[eluser]BrianDHall[/eluser]
[quote author="ThatBlokeRob" date="1259188547"]Hey Brian,
How do I enable GET?
I set uri protocol PATH_INFO and that stopped getting to the error page, now just the home page.
How do I get it to view the page the browsers on?
Robin[/quote]
In config.php:
Code:
/*
|--------------------------------------------------------------------------
| Enable Query Strings
|--------------------------------------------------------------------------
|
| By default CodeIgniter uses search-engine friendly segment based URLs:
| example.com/who/what/where/
|
| You can optionally enable standard query string based URLs:
| example.com?who=me&what=something&where=here
|
| Options are: TRUE or FALSE (boolean)
|
| The other items let you set the query string "words" that will
| invoke your controllers and its functions:
| example.com/index.php?c=controller&m=function
|
| Please note that some of the helpers won't work as expected when
| this feature is enabled, since CodeIgniter is designed primarily to
| use segment based URLs.
|
*/
$config['enable_query_strings'] = TRUE;
$config['controller_trigger'] = 'c';
$config['function_trigger'] = 'm';
Now you could do ?c=controller&m=function and basically get rid of segment routing, but I like having both together, thus the use of PATH_INFO setting in config.php.
So now with the hybrid if it works properly you should be able to have website.com/controller/function?search=search+terms
And CI will handle everything as if there was no query string - only $GET will still be available everywhere, so you can access it directly and do whatever you like. Oh you may have to add some extra stuff to permitted_uri_chars so CI won't complain about the + sign and such.