Drupal 8 - Redirect from a path

by Muhammad Tashfeen   Last Updated September 11, 2019 10:07 AM

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.

Drupal::request()->server->get('HTTP_REFERER');

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.



Related Questions






Delete single redirection

Updated June 07, 2019 16:07 PM