I want to learn symfony and I start to create a small application. I have a question related to the routes. So, I have in my project the routes :
/admin/homepage
, /admin/news
, admin/galery
No if I write in url /admin
, this route doesn't exist and I get as error No route found for "GET /admin/"
. Exist a way to check if route doesn't exist and redirect to another route for example ? Thx in advance and sorry for my english
My routes :
news_all:
path: /news/all/{page}
defaults: { _controller: AppAdminBundle:News:all, page: 1 }
requirements:
page: \d+
_method: GET|POST
news_add:
path: /news/add
defaults: { _controller: AppAdminBundle:News:add }