Redirect from within CFilter

Can anyone help or suggest a better way to do this?

I have setup a filter and want to redirect the user. It appears that Yii::app()->request->redirect() does not accept a query string in the same way that CController::redirect() does. How can I pass $_GET vars in my code below?


class SetUpFilter extends CFilter


	public $url;

	public $setUp;


    protected function preFilter($filterChain)



    		$request = Yii::app()->request;

    		$url = $request->baseUrl.'/setUp/index';

		$request->redirect($url, array('previousUrl'=>$this->url));






    protected function postFilter($filterChain)


        // logic being applied after the action is executed



$_GET[‘previousUrl’] is not being passed with the redirect.

Thank you.

code it this way

$params = $_GET['variable'];

$redirect = new Controller('setUp'); 


i have not tested it. but hope it should work.


What about:



$filterChain->controller->redirect(); did the trick!!

Thanks to both of you.