Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

router url addres suffix “/” How to add ??

$router = new Phalcon\Mvc\Router(false);

    //默认首页 public
    $router->setDefaultModule("public");

    //小组 后台首页
    $router->add('/admin', array(
            'module' => 'backend',
            'controller' => 'index',
            'action' => 'index'
    ));
    //前台首页
    $router->add('/index', array(
            'module' => 'public',
            'controller' => 'index',
            'action' => 'index'
    ));     

    //小组
    $router->add('/group', array(
            'module' => 'group',
            'controller' => 'index',
            'action' => 'index'
    ));

return $router;

++++++++++++++++++++++++++++++++++++ look like this : http://forum.phalconphp.com/post/discussion

I want this url: http://forum.phalconphp.com/post/discussion/

so /

I want to like this :

http://xxx.com/discussion” and “http://xxx.com/discussion/”

The same result ,But now is not the result



6.4k

http://xxx.com/discussion” and “http://xxx.com/discussion/”

I want The same result ,But now is not the result but now According to the results of the different



6.4k
Accepted
answer

oh $router->removeExtraSlashes(true); Has been solved