take me backCodeIgniter Controller Names with Dashes
June
Friday
17
I prefer to use dashes with my CI2 controller names, so the below solves that problem.
Simply create a file called 'MY_Router.php' and place it in the '/application/core/' folder.
class MY_Router extends CI_Router
{
function _set_request($segments = array()) {
parent::_set_request(str_replace('-', '_', $segments));
}
}
Comments are now closed








