We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

the first tutorial [exception not getting caught]

I just installed phalcon on a digitalocean host and I am testing the first tutorial.

I adjusted the exception catch code on the bootstrap page (index.php) to return a 404 error page instead of the PhalconException with the message. I have been monitoring the httpd logs to see the traffic as this a public site. And I noticed the 404 response was working on most unknown paths that were being inserted by error but when there is a hyphen inside the path like /mysql-admin then the page returns to the index view returning with the 200 response.

I am curious to know why the hypen (-) makes the url go through and the other pages get the 404?



51.2k

Are you sure that /mysql-admin or other /string-string url is not a virtual one, provided by the host ? Like /phpmyadmin on most of the hosts, etc.



508

Any url path with a hyphen does not return an exception. Actually, it is a virtual private host with a vanilla centos image. Only I have root access. I installed apache php mysql using yum. I downloaded phalcon 1.2 with git and compiled it. Then I did the tutorial 1 and left it there to monitor it using with the robots.txt denying access to all spider bots. You can see it at robijon.com with http or https I think that the hyphen in the path should not prevent phalcon from throwing an exception. Is this documented behavoir? Thanks for your reply.