Dec 05
Digg
Stumbleupon
Technorati
Delicious

symfony referer redirect

Quick way to redirect back to referer page in symfony 1.3/1.4:

    $this->redirect($request->getReferer());

Its pretty useful when you send load of parameters to some action (e.g. delete) and then need to return back to sender page (so instead of using generateUrl() method with all return parameters it makes sense to use getReferer() method).


Author: symfonian

3 Comments

zokratez
May 9, 2011

$this->redirectReferer()

Guillermo
August 13, 2011

You’re awesome man! I was searching this for about an hour!

ianrussel
April 18, 2015

i have small app based on symfony 1.4.Instead of redirecting to another page, I want to display doctrine query results on the same templates.

Comments RSS TrackBack Identifier URI

Leave a comment