For these situations, I want to auto redirect back to the pages from where I made the request:
A different situation (which is not 'redirect to previous page'):
I have already searched over net for this and found some solutions but they are not according to Zend Framework 2. I want all this to be done in zf2 way.
Thanks for any help!
This worked for me:
$url = $this->getRequest()->getHeader('Referer')->getUri();
$this->redirect()->toUrl($url);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With