I have a routing.yml file with a path which triggers a controller method. When the controller method finishes the operation I want to return user to the page he came from originally. I don't want to rely on the http_referer here as it is declared unsafe from Symfony already.


How can I approach this problem? Is there a way to do it using routing optional parameters? If so a little help would be appreciated.

  • 1
    The only reliable solution is to append a destination to the query parameters in the incoming URL (that's how Drupal solves the same problem internally) – Clive Sep 11 '19 at 10:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.