protected function redirect ($url, $code = 301) {
		$app = \MvcCore\Application::GetInstance();
		$app->GetResponse()
			->SetCode($code)
			->SetHeader('Location', $url);
		$app->Terminate();
	}
protected function redirect ($url, $code = 301) {
		$app = \MvcCore\Application::GetInstance();
		$app->GetResponse()
			->SetCode($code)
			->SetHeader('Location', $url);
		$app->Terminate();
	}
protected function redirect ( $ url , $ code = 301 ) { $ app = \ MvcCore \ Application :: GetInstance ( ) ; $ app -> GetResponse ( ) -> SetCode ( $ code ) -> SetHeader ( 'Location' , $ url ) ; $ app -> Terminate ( ) ; }
Redirect request to given URL with optional code and terminate application.
@param string	$url New location url.
@param int		$code Http status code, 301 by default.
Redirect request to given URL with optional code and terminate application .