Welcome Guest, Not a member yet? Register   Sign In
set default uri_protocol to PATH_INFO instead of AUTO
#5

[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.


Messages In This Thread
set default uri_protocol to PATH_INFO instead of AUTO - by El Forum - 03-12-2009, 03:23 AM
set default uri_protocol to PATH_INFO instead of AUTO - by El Forum - 11-25-2009, 08:43 AM
set default uri_protocol to PATH_INFO instead of AUTO - by El Forum - 11-25-2009, 10:07 AM
set default uri_protocol to PATH_INFO instead of AUTO - by El Forum - 11-25-2009, 10:35 AM
set default uri_protocol to PATH_INFO instead of AUTO - by El Forum - 11-25-2009, 11:26 AM
set default uri_protocol to PATH_INFO instead of AUTO - by El Forum - 11-26-2009, 04:15 AM
set default uri_protocol to PATH_INFO instead of AUTO - by El Forum - 01-26-2011, 01:32 PM
set default uri_protocol to PATH_INFO instead of AUTO - by El Forum - 02-03-2011, 01:43 PM
set default uri_protocol to PATH_INFO instead of AUTO - by El Forum - 02-05-2011, 03:27 PM



Theme © iAndrew 2016 - Forum software by © MyBB