Symfony route annotation exclude route

  annotations, regex, routes, symfony

I have the following annotation, so any route except the api,
I wanna also exclude all the routes that start with /admin too
I’m sorry I’m new to symfony and i also dont know much about regular expressions please someone help

/**
 * @Route("/", name="homepage")
 * @Route("/{route}", name="vue_pages", requirements={"route"="^(?!.*api).+"})
 */

Source: Symfony Questions

LEAVE A COMMENT