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

Routing problem, indexAction runs everytime even in invalid routes

Hello, I'm new to phalconphp and I'm having problems with setting up new pages. I created modules project using the devtools, added helloAction to the IndexController in frontend module but when I go to /frontend/index/hello it shows me the indexAction. I've tried creating static routes without any dynamic params but that didn't work too.



413
Accepted
answer

Well, I was trying to run server via php -S 127.0.0.1:8080 public/index.php command but found out that way mod_rewrite will not work. Then I found out that skeleton project already has a script to run server .htrouter.php. It works now.



3.4k
edited Apr '17

Phalcon does have logic to make a command line application by the way - https://docs.phalcon.io/en/3.0.1/reference/cli.html