I have created a routing to my site, and works perfectly on this way
//WORKS
$router = new Router();
//App Route
$router->add(
'/online/{slug}',
array(
'controller' => 'application',
'action' => 'app',
'slug' => 1,
));
//Category Route
$router->add(
'/categoria/{slug_category}/{current_page}',
array(
'controller' => 'category',
'action' => 'apps',
'slug_category' => 1,
'current_page' => 2,
));
return $router;
});
https://mysite.com/online/app_name //OK
https://mysite.com/categoria/name_category //OK
But, when i decided change the category routing and removing /categoria/ the category route yet works but App Route don't works anymore, return HTTP ERROR 500.
//DON'T WORKS
$router = new Router();
//App Route
$router->add(
'/online/{slug}',
array(
'controller' => 'application',
'action' => 'app',
'slug' => 1,
));
//Category Route
$router->add(
'/{slug_category}/{current_page}',
array(
'controller' => 'category',
'action' => 'apps',
'slug_category' => 1,
'current_page' => 2,
));
return $router;
});
https://mysite.com/online/app_name //HTTP ERROR 500
https://mysite.com/name_category //OK
So, what is wrong on this second script that causes this erro on app route?