Redirect a page

@param string $url
@param array  $params

@param int    $status

@return bool
518229
public function redirect($url, array $params = [], $status = 302)
    {
        if (!empty($params)) {
            $url = rtrim(preg_replace('/\?.*/', '', $url), '/');
            $url .= "?" . http_build_query($params);
        }

        $this->statusCode = $status;
        $this->headers->set('Location', $url);

        $this->getMbAudit()->setResponseType('redirect');
        $this->getMbAudit()->setResponseData([
            'url' => $url,
        ]);

        return true;
    }
798716
public function redirect($route, $parameters = [], $status = 302)
    {
        return $this->application->redirect($this->path($route, $parameters), $status);
    }
479233
public function redirect($url, $statusCode = 302)
    {
        if (strpos($url, '/') === 0 && strpos($url, '//') !== 0) {
            $url = request()->root() . $url;
        }

        $this->status($statusCode);
        $this->headers->set('Location', $url);
    }
539955
public function redirect($url, $params = [], $is_query_string = false)
	{
		if (!preg_match('/^http/', $url)) {
			$url_builder = new \werx\Url\Builder(null, null, $this->expose_script_name);

			if ($is_query_string && is_array($params)) {
				$url = $url_builder->query($url, $params);
			} else {
				$url = $url_builder->action($url, $params);
			}
		} else {
			// External url. Just do a basic expansion.
			$url_builder = new \Rize\UriTemplate;
			$url = $url_builder->expand($url, $params);
		}

		/**
		 * You MUST call session_write_close() before performing a redirect to ensure the session is written,
		 * otherwise it might not happen quickly enough to save your session changes.
		 */
		session_write_close();

		$response = new RedirectResponse($url);
		$response->send();
		exit;
	}
52659
public function redirectIfNotUrl($url, array $allowParams = array())
    {
        if ($url != $this->getRequest()->getRequestUri()) {
            $redirect = true;
            $newArgs = array();
            try {
                $tmp = parse_url($this->getRequest()->getRequestUri());
                if (isset($tmp['path']) && $tmp['path'] == $url) {
                    $redirect = false;
                }
                if (isset($tmp['query'])) {
                    parse_str($tmp['query'], $args);
                    $alloweds = array_merge($allowParams, $this->getParameter('nyroDev_utility.redirectIfNotUrl_params', array()));
                    foreach ($alloweds as $k) {
                        if (isset($args[$k])) {
                            $newArgs[$k] = $args[$k];
                        }
                    }
                    $redirect = count($newArgs) != count($args);
                }
            } catch (\Exception $e) {
                $redirect = false;
            }
            if ($redirect) {
                return new RedirectResponse($url.(count($newArgs) ? '?'.http_build_query($newArgs) : ''), 301);
            }
        }

        return false;
    }
506734
public function redirect($url, $status = 302)
    {
        $this->setStatus($status);
        $this->headers->set('Location', $url);
    }
642995
protected function redirect($url,$param=[])
    {
        if(Request::isAjax()){
            return $this->json(1,'跳转',['url'=>url($url,$param)]);
        }
        if(substr($url,0,3)==='ef:'){
            $url=substr($url,3);
            echo '<script type="text/javascript">top.location.href="'.url($url,$param).'";</script>';
        }else{
            header('Location:'.url($url,$param));
        }
        exit;
    }
339284
public function redirect($url, $status = StatusCode::FOUND)
    {
        return $this->withStatus($status)->withHeader('location', $url);
    }
409121
public function redirect($url, $status = 301)
    {
        $status = (int) $status;

        if (!empty($url)) {

            header($this->get('protocol') . ' 301 Redirect');
            header('Status: ' . $status . ' Redirect');
            header('Location: ' . $url);
            exit(0);
        } else {
            throw new \Exception('Url is empty !');
        }
    }
962845
public function post($url, array $params)
    {
        $request = new Request(
            $url,
            'POST',
            'php://temp',
            ['content-type' => 'application/json']
        );

        $request->getBody()->write(json_encode($params));
        return $this->send($request);
    }
1304944
public function to($path, $status = 302, $headers = [], $secure = null)
    {
        $path = $this->app->make('url')->to($path, [], $secure);

        return $this->createRedirect($path, $status, $headers);
    }
350015
public function redirect(string $page, array $params = [])
    {
        // Redirects with the url function
        header('Location: ' . $this->url($page, $params));
        exit;
    }
1031814
public function post($url, $params = [])
    {
        $req = $url instanceof Request ? $url : $this->buildRequest('POST', $url);
        foreach ($params as $key => $value) {
            $req->addPostField($key, $value);
        }
        return $this->exec($req);
    }
289057
public function redirect($path, $status = 302, $headers = [], $secure = null)
    {
        return Redirect::to($this->uri() . '/' . $path, $status, $headers, $secure);
    }
1199699
protected function redirectView($url, $statusCode = Response::HTTP_FOUND, array $headers = [])
    {
        return View::createRedirect($url, $statusCode, $headers);
    }
366293
protected function routeRedirectView($route, array $parameters = [], $statusCode = Response::HTTP_CREATED, array $headers = [])
    {
        return View::createRouteRedirect($route, $parameters, $statusCode, $headers);
    }
975447
public function back($status = 302, $headers = array())
	{
		$back = $this->generator->getRequest()->headers->get('referer');

		return $this->createRedirect($back, $status, $headers);
	}