i have this code in my routes.php file (app/config/routes.php)
<?php
$router = new Phalcon\Mvc\Router(true);
$router->add('/contact-us', array(
'controller' => "contact",
'action' => "index"
));
$router->removeExtraSlashes(true);
return $router;
However, if I type
https://localhost/myproject/contact-us/
into the browser
the url will remain the same and the last slash is not removed.
I want this
https://localhost/myproject/contact-us
How to do that? Why is $router->removeExtraSlashes(true);
not working as it was supposed to?
The worst part is that The user can type something like that: https://localhost/myproject/contact-us///////
and the slashes won't be removed ;(