Allow trailing slash for Symfony2 route without params?

前端 未结 7 1121
时光取名叫无心
时光取名叫无心 2020-12-08 19:08
acme_admin_dashboard:
    pattern:  /{_locale}/admin
    defaults: { _controller: AcmeBundle:Admin:dashboard }

I want this route to be accessible a

7条回答
  •  醉梦人生
    2020-12-08 19:31

    Just type :

    /**
    * @Route("/route/of/some/page/")
    */
    

    so

    www.example.com/route/of/some/page 
    

    and

    www.example.com/route/of/some/page/
    

    are accepted...

提交回复
热议问题