Yes of course,
you can handle it with event manager easily. just add your specific routes to your router the add this code to your application's bootstrap file
$dispatcher = new \Phalcon\Mvc\Dispatcher();
$eventsManager = new \Phalcon\Events\Manager();
$eventsManager->attach("dispatch", function ($event, $dispatcher, $exception) use ($di)
{
if ($event->getType() == 'beforeNotFoundAction') {
$dispatcher->forward(array(
'module' => 'YOUR MODULE',
'controller' => 'YOUR CONTROLLER',
'action' => 'YOUR ACTION'
));
return false;
}
});
$dispatcher->setEventsManager($eventsManager);
$di->setShared('dispatcher', $dispatcher);
It will forward all undefined route to YOUR_MODULE/YOUR_CONTROLLER/YOUR_ACTION
You can ignore MODULE if you have a single module app