Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

How to send parameters using Response->redirect?



42.4k
Accepted
answer

I'm afraid there is no utility method for that in response->redirect(). You can pass in parameters as a string:

$this->response->redirect('/my/url/'.join('/',['my','custom','params']));

dispatcher->forward() does accept a params key, although it's not the same as redirect.



67.7k

i think the answer is you cant, but you can redirect to /myroute?param1=yes&param2=no

after that //print_r($_GET);

As an afterthought, if you need named routes you can hook it up with url:

$this->response->redirect($this->url->get([
    'for' => 'namedRoute',
]) . '/' . join('/', ['my','custom','params']));