1
I have the following route in Routes.php:
$route['xxxxx/(:any)'] = 'Order/index/$1';
And the following index in the Order controller:
public function index(){
switch( $this->uri->segment(2)){
case $this->step2:
$this->motivation();
break;
case $this->step3:
$this->about();
break;
case $this->status:
$this->status();
break;
case 'post':
$this->post();
break;
case 'teste':
$this->teste();
break;
default:
$this->register();
break;
}
}
But when I try to enter this route by typing localhost/xxxxx for example, it returns me error 404 Page Not Found.
And if you access
localhost/xxxxx/teste
?– Woss
@Andersoncarloswoss works there
– Igor Oliveira
Apparently it only works if I pass a second segment
– Igor Oliveira
And
localhost/xxxxx/
, with the bar at the end?– Woss
With the bar at the end n works too, same thing
– Igor Oliveira
How’s the function? of this controller?
– novic