How do you show a 404 when there are extra URL segments in CodeIgniter? How do you show a 404 when there are extra URL segments in CodeIgniter? codeigniter codeigniter

How do you show a 404 when there are extra URL segments in CodeIgniter?


Not sure why you'd want to do that really, but you could use func_num_args() and validate from that, i.e.,

public function register($step = NULL){  if ( func_num_args() > 1 ) show_404();}