CodeIgniters URI Protocol

April 23, 2011 by Andrew Seymour

One of my fellow colleagues was having difficulty getting CodeIgniter to change page – when you’ve started the project from scratch it’s probably easier to work out what the issue is but in a team, people do things differently and often config settings change that wouldn’t ordinarily – that and upgrading older versions of CodeIgniter to newer ones often leaves behind old settings that often would have a different default setting in newer configs.

One thing to remember, in the application/config/config.php file – if the “uri_protocol” setting is set to “ORIG_PATH_INFO” and you’re trying to run it locally you’ll realise CodeIgniter wont change page – I’d recommend setting this to “AUTO” but if you want, setting it to “PATH_INFO” will work but remember when moving back to a server such as your favourite Linux hosting account to change it to “ORIG_PATH_INFO” and vice-versa as the cycle continues.

The latest CodeIgniter’s I’ve seen support “AUTO” as an option so I’d recommend setting to that to stop any further confusion.


Categories: CodeIgniter, PHP