protected function Redirect($action, $feedback =  null, $params = "", $mode = "")
	{
		if (!$mode) $mode = self::$DefaultRedirectMode;

		$params = is_array($params) ? $params : array();

		if ($feedback != null)
		{
			$this->Context->Set("feedback",$feedback);
		}

		// support for deprecated Controller/Method format
		list($controller,$method) = explode(".", str_replace("/",".",$action));

		$url = $this->GetRouter()->GetUrl($controller,$method,$params);

		// capture output instead of rendering if specified
		if ($this->CaptureOutputMode)
		{
			if ($mode == 'client')
			{
				$this->RenderEngine->assign("url",$url);
				$this->DebugOutput = $this->RenderEngine->fetch("_redirect.tpl");
			}
			else
			{
				$this->DebugOutput = 'Location: ' . $url;
			}
		}
		else
		{

			if ($mode == 'client')
			{
				$this->RenderEngine->assign("url",$url);
				$this->RenderEngine->display("_redirect.tpl");
			}
			else
			{
				header('Location: ' . $url) ;
			}

		}

		// don't exit if we are unit testing because it will stop all further tests
		if (!$this->UnitTestMode) exit;

	}