public function redirect($url='') {
		if(!preg_match('/^(?:\/|\\\\|\w:\\\\|\w:\/).*$/', $url) && !preg_match('/^[a-zA-Z0-9]*:\/\//', $url))#relative
			$url = $this->request->url->to($url);
		$this->setHeader('Location', $url);
		if($this->code === 200)
			$this->setCode(302);
		return $this;
	}
public function redirect($url='') {
		if(!preg_match('/^(?:\/|\\\\|\w:\\\\|\w:\/).*$/', $url) && !preg_match('/^[a-zA-Z0-9]*:\/\//', $url))#relative
			$url = $this->request->url->to($url);
		$this->setHeader('Location', $url);
		if($this->code === 200)
			$this->setCode(302);
		return $this;
	}
public function redirect ( $ url = '' ) { if ( ! preg_match ( '/^(?:\/|\\\\|\w:\\\\|\w:\/).*$/' , $ url ) && ! preg_match ( '/^[a-zA-Z0-9]*:\/\//' , $ url ) ) #relative $ url = $ this -> request -> url -> to ( $ url ) ; $ this -> setHeader ( 'Location' , $ url ) ; if ( $ this -> code === 200 ) $ this -> setCode ( 302 ) ; return $ this ; }
Redirect the user to a given url.
@param  string $url
@return Response
Redirect the user to a given url .