Redirect to the [[cancelUrl]] or simply close the popup window.
@param string $url URL to redirect.
@return \yii\web\Response response instance.
541304
public function redirectCancel($url = null)
    {
        if ($url === null) {
            $url = $this->getCancelUrl();
        }
        return $this->redirect($url, false);
    }
1231812
public function validRedirectUrl($url)
    {
        $root = $this->app->uri->root;

        if (strpos($url, '/') === 0) {
            return $url;
        }

        if (stripos($url, $root) !== 0) {
            return $root;
        }

        return $url;
    }
973697
protected function passToCmsController($url)
    {
        if (class_exists('\Cms\Classes\Controller')) {
            return App::make('Cms\Classes\Controller')->run($url);
        } else {
            return Response::make(View::make('backend::404'), 404);
        }
    }
1127817
public function redirect($url, $permanent = false, $refresh = false)
	{
		if(strpos($url, '://') === false)
		{
			$host = APP_HOST;
			if( strlen($url) && $url[0] !== "/" )
			{
				$host .= "/";
			}

			$url = BASE_PROTOCOL . '://' . $host . $url;
		}

		EventManager::dispatch(new ResponseRedirectEvent($this, $url, $permanent, $refresh));

		if( headers_sent() )
		{
			$body  = '<html><head>';
			$body .= '<meta http-equiv="refresh" content="1; url=' . $url . '" />';
			$body .= '<title>Redirecting</title>';
			$body .= '</head><body onload="location.replace(\'' . str_replace( "'", "\\'", $url );
			$body .= '\' + document.location.hash)">Redirecting you to ' . $url . '</body></html>';
			$this->setBody($body);
		}
		else
		{
			$this->setCode($permanent ? 301 : 302);
			if( $refresh )
			{
				$this->header("Refresh", "0; URL=" . $url);
			}
			else
			{
				$this->header('Location', $url);
			}
		}

		$this->lock();

		return $this;
	}
247665
public function performRequest($url)
    {
        $client = $this->getClient();

        return $this->response = $client->get($url);
    }
1088425
public function redirect ($url, $statusCode = 302)
		{
			parent::redirect($url, $statusCode);
			Yii::$app->end();
		}
722515
public function redirect(string $url): void {
		if (!filter_var($url, FILTER_VALIDATE_URL)) {
			throw new ResponseException("Invalid URL: $url", ResponseException::INVALID_URL);
		}
		
		$this->setType("redirect");
		$this->data["url"] = $url;
	}
944299
public function setRedirectUrl($redirectUrl)
    {
        $redirectUrl = filter_var($redirectUrl, FILTER_VALIDATE_URL);
        if (false === $redirectUrl) {
            throw new \InvalidArgumentException('The argument is not an URL');
        }
        $this->redirectUrl = $redirectUrl;
        return $this;
    }
40993
protected function _send_delete_request( $url ) {
		$response = $this->_send_request( $url, array( 'method' => 'DELETE' ) );

		$response_code = wp_remote_retrieve_response_code( $response );
		$this->assertEquals( 200, $response_code, 'The Mailtrap.io API resonse code is not equals to 200.' );

		return $response;
	}
1058969
public function redirect($url)
    {
        if (preg_match(STATIC_URL_REGEX, $url)) {
            return $this->registerScript('window.location.replace("' . $url . '");');
        }
        return $this->registerScript('$.router.replace("' . $url . '");');
    }
189352
protected function redirectLogin($url)
    {
        if ($this->request->acceptJson()) {
            $url = $this->url->append($url, ['next' => $this->request->getReferer()]);

            return $this->response->json([
                'code' => -401,
                'message' => '您好,请登录',
                'redirect' => $url,
            ]);
        } else {
            $url = $this->url->append($url, ['next' => $this->request->getUrl()]);

            return $this->response->redirect($url);
        }
    }
701613
public function doRedirect($url, $permanent = false)
    {
        $this->setResponseCode($permanent ? ResponseCode::HTTP_MOVED_PERMANENTLY : ResponseCode::HTTP_FOUND);
        $this->setHeader('Location', $url);
        return $this;
    }
982513
public static function redirect($url, $args = null) {
        if (strpos($url, '\\') !== false) {
            $url = self::action($url);
        } else {
            $url = self::url($url);
        }
        if (!empty($args)) {
            $url .= '?' . http_build_query($args);
        }
        Response::redirect($url, '');
    }
490067
public static function cancel($title = null, $url = null, array $options = [])
    {
        $toolbar = Toolbar::getInstance(self::$_toolbar);
        $options += [
            'icon'      => 'close',
            'iconClass' => 'ckTextRed',
            'button'    => 'grey lighten-3'
        ];

        if (empty($url)) {
            $url = ['action' => 'index'];
        }

        $title = (empty($title)) ? __d('core', 'Cancel') : $title;

        $toolbar->appendButton('Core.link', $title, $url, $options);
    }
108929
public static function redirect($url,$isHttps=false){
		if($url){
			if(substr($url,0,4) != "http"){
				$url = self::getUrl($url,[],$isHttps);	
			}
			header("Location: $url");
			exit;
		}
	}
1047672
public static function logoutWithUrl($url)
    {
        trigger_error('Function deprecated for cas servers >= 3.3.5.1', E_USER_DEPRECATED);
        phpCAS :: traceBegin();
        if (!is_object(self::$_PHPCAS_CLIENT)) {
            phpCAS :: error('this method should only be called after ' . __CLASS__ . '::client() or' . __CLASS__ . '::proxy()');
        }
        if (!is_string($url)) {
            phpCAS :: error('type mismatched for parameter $url (should be `string\')');
        }
        self::$_PHPCAS_CLIENT->logout(array ( "url" => $url ));
        // never reached
        phpCAS :: traceEnd();
    }
1332899
public function refreshUrl($url)
    {
        $urls = is_array($url) ? $url : func_get_args();

        return $this->request($urls, 'urls', 'RefreshCdnUrl');
    }