Skip to content

Instantly share code, notes, and snippets.

@przor3n
Created December 14, 2015 13:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save przor3n/7e6e864f8a5d396115f8 to your computer and use it in GitHub Desktop.
Save przor3n/7e6e864f8a5d396115f8 to your computer and use it in GitHub Desktop.
Redirect to route in routes.yml
SomeRoute:
pattern: /someroute
defaults:
_controller: SomeBundle:Controller:action
AnotherRoute:
pattern: /anotherroute
defaults:
_controller: FrameworkBundle:Redirect:redirect
route: SomeRoute
permanent: true # this is for 301
page: 5 # you can pass additional attributes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment