Redirect to the default view

@param ModeBasedUrlProvider $urlProvider
351523
public static function resetView (ModeBasedUrlProvider $urlProvider)
    {
        $redirectHeader = 'Location: ' . $urlProvider->getModeUrl(self::MODE_DEFAULT);
        header($redirectHeader);
        exit;
    }
1199699
protected function redirectView($url, $statusCode = Response::HTTP_FOUND, array $headers = [])
    {
        return View::createRedirect($url, $statusCode, $headers);
    }
769192
public function route(string $name, string $default = '/'): UrlGenerator
    {
        // Boot the application.
        $this->boot();

        return parent::route($name, $default);
    }
912608
protected function redirectToVersion ($systemParams) {
		/** @var $request \MvcCore\Request */
		$request = & $this->request;
		
		// get domain with base path URL section, 
		// path with query string URL section 
		// system params for URL prefixes
		// and if path with query string URL section targeting `/` or `/index.php`
		$targetModule = NULL;
		$domainParamsDefault = [];
		$domainParams = [];
		if ($this->currentDomainRoute !== NULL) {
			$targetModule = $this->currentModule;
			$domainParamsDefault = $this->requestedDomainParams;
		}

		if ($targetModule !== NULL) {
			// remove domain module params and complete URL address base part by module domain
			$domainParams = array_intersect_key($systemParams, $domainParamsDefault);
			//$systemParamsClone = array_diff_key($systemParams, $domainParamsDefault);
			$defaultDomainParams = array_merge([], $this->GetDefaultParams() ?: []);
			
			if (method_exists($this, 'redirectCorrectDomainSystemParams')) 
				$this->redirectCorrectDomainSystemParams($domainParams);

			list($domainUrlBaseSection,) = $this->currentDomainRoute->Url(
				$request, $domainParams, $defaultDomainParams, ''
			);
		} else {
			$domainUrlBaseSection = NULL;
		}
		
		list ($urlBaseSection, $urlPathWithQuerySection, $systemParams, $urlPathWithQueryIsHome) 
			= $this->redirectToVersionSections($systemParams);

		$targetUrl = $this->urlByRoutePrefixSystemParams(
			$domainUrlBaseSection ?: $urlBaseSection, 
			$urlPathWithQuerySection, 
			array_diff_key($systemParams, $domainParamsDefault), 
			$urlPathWithQueryIsHome
		);

		
		$questionMarkPos = mb_strpos($targetUrl, '?');
		if ($questionMarkPos !== FALSE) $targetUrl = mb_substr($targetUrl, 0, $questionMarkPos);

		$fullOriginalUrl = $request->GetBaseUrl() . $request->GetOriginalPath();
		
		if ($fullOriginalUrl === $targetUrl) return TRUE;

		$this->redirect($targetUrl, $this->redirectStatusCode);

		return FALSE;
	}
485238
protected function redirectToReferer(): RedirectResponse
    {
        $url = $this->requestService->fetchRefererUrl();

        // Oops, url of referer is unknown
        if ('' === $url) {
            throw CannotRedirectToEmptyRefererUrlException::create();
        }

        return $this->redirect($url);
    }
189656
public function redirect($canonical) {
        if (!preg_match('~^[a-z]+://~', $canonical)) {
            $canonical = new Garp_Util_FullUrl($canonical);
        }
        $controller = $this->getActionController();
        $controller->getHelper('cache')->disable();
        $controller->getHelper('viewRenderer')->setNoRender(true);
        $controller->getHelper('layout')->disableLayout();
        $controller->getHelper('redirector')->gotoUrl((string)$canonical, array('code' => 301));
    }
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;
    }
402383
public function redirect($url = null, $exitAfter = true)
    {
        if (empty($url)) {
            $url = $this->getRedirectUrl();
        }
        $this->_stateMgr->writeClose();
        if (session_id()) {
            session_write_close();
        }
        header("Location: $url");
        if ($exitAfter) {
            exit();
        }
    }
227412
public function withRedirect(UriInterface $uri): self
    {
        $middleware = clone $this;
        $middleware->redirect = $uri;

        return $middleware;
    }
979798
public function setRedirectUrl($sRedirectUrl)
    {
        if (!$this->bIsLocked) {
            $this->sRedirectUrl = $sRedirectUrl;
            $this->setIsRedirect(!empty($sRedirectUrl));
        }
        return $this;
    }
261268
static function redirectRequest($default_inner_url='') {
        $return_url = self::getRequest()->getParameter('return');
        if($return_url){
            if(substr($return_url, 0,1)=='/'){
                $url = $return_url;
            }else{
                $url = '/';
            }
        }else{
            $url = self::innerUrl2OuterUrl($default_inner_url);
        }
        self::redirectOut($url);
    }
582404
function redirect($pattern,$url,$permanent=TRUE) {
		if (is_array($pattern)) {
			foreach ($pattern as $item)
				$this->redirect($item,$url,$permanent);
			return;
		}
		$this->route($pattern,function($fw) use($url,$permanent) {
			$fw->reroute($url,$permanent);
		});
	}
45234
public function redirectToFormReferrer(FormInterface $form, string $defaultRoute): RedirectResponse
    {
        $referrer = $form->get('http-referrer')->getData();

        return $this->redirectToFirstValidRoute([$referrer, $defaultRoute]);
    }
69157
public function setUriProvider(UriProvider $provider)
    {
        $this->uriProvider = $provider; 
        common_ext_ExtensionsManager::singleton()->getExtensionById('generis')->setConfig(self::CONFIG_KEY, $provider);
    }
110046
public static function redirectToReferrer()
    {
        $referrer = self::getReferrer();
        if ($referrer !== false) {
            self::redirectToUrl($referrer);
        }
        self::redirectToUrl(self::getCurrentUrlWithoutQueryString());
    }
621612
protected function _redirect($url, $httpStatusCode = 302)
    {
        if (empty($url)) throw new ControllerRedirectEmptyUrlException('Cannot redirect to an empty url.');

        header('location:' . $url, true, $httpStatusCode);
        exit;
    }
1339955
protected function redirectAfterUpdate()
    {
        merchant_toastr(trans('merchant.update_succeeded'));

        $url = Input::get(Builder::PREVIOUS_URL_KEY) ?: $this->resource(-1);

        return redirect($url);
    }