Symfony Sonata Redirect of the Root URL to the admin area


If you enter the user in the browser without a path (www.foo.de) to the admin area of Sonata (www.foo.de/admin) wants to forward, this can be done very elegantly by means of a Symfony redirect in the routing.yml do:

index:
  path: /
  defaults:
    _controller: FrameworkBundle:Redirect:urlRedirect
    path: /admin
    permanent: true

Comments are closed.