Hello. I am a newbie in Phalcon PHP and I'm currently developing a CMS.
I am having a problem on routing the inputted address like I want to check first if the controller or action exists or not. If not, it should redirect to my action handler and check if this is a post and if it is not a post it should redirect to 404 page.
Currently, I have this code on my router to check
$router->add( '/([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)', [ 'controller' => 'posts', 'action' => 'viewPostHandler', 'posts_category' => 1, 'posts_slug' => 2 ] );
But, it is catching my /index/logout and index/login
Please help me.