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 URL

I have a problem with my url and now I use routing for my app, for example if i go to url like this

www.example.com/url/url

that is good and not something wrong. but when I put on the last url with "/", I get error message

www.example.com/url/url/

App\Controllers\NameOfController handler class cannot be loaded

so.. how if I visit the url it , without any error ? despite using the " / " at the end of the url and do not use it ?



6.2k
Accepted
answer

HI I solved this problem. the way is put this in our routes file

$router->removeExtraSlashes(true);