Add a route that sends an HTTP redirect

@param string              $from
@param string|UriInterface $to
@param int                 $status

@return RouteInterface
179185
public function redirect($from, $to, $status = 302)
    {
        $handler = function ($request, ResponseInterface $response) use ($to, $status) {
            return $response->withHeader('Location', (string)$to)->withStatus($status);
        };

        return $this->get($from, $handler);
    }
1102046
protected function redirect($url, $statusCode = 302)
    {
        $response = new RedirectResponse($url, $statusCode);
        $this->getServiceLocator()->set('Response', $response);

        return $response;
    }
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);
    }
520818
protected function responseRedirect($url, $status = null)
    {
        $responseWithRedirect = $this->_response->withHeader('Location', (string)$url);
        if (is_null($status) && $this->_response->getStatusCode() === 200) {
            $status = 302;
        }
        if (!is_null($status)) {
            return $responseWithRedirect->withStatus($status);
        }
        return $responseWithRedirect;
    }
1008600
public function to($path, $status = 302, $headers = array(), $secure = null)
    {
        $path = $this->generator->to($path, array(), $secure);

        return $this->createRedirect($path, $status, $headers);
    }
339284
public function redirect($url, $status = StatusCode::FOUND)
    {
        return $this->withStatus($status)->withHeader('location', $url);
    }
1217886
public static function redirect($location, $args = "", $status = 302) {
        global $is_IIS;
        if (!$location) {
            return;
        }
        if (!empty ($args) && is_array($args)) {
            $_args = [];
            foreach ($args as $n => $v) {
                $_args [ $n ] = $n . '=' . urlencode($v);
            }
            $args = implode('&', $_args);
        }
        if (!empty ($args) && is_string($args)) {
            if (strpos($location, '?') !== false) {
                $location .= '&' . $args;
            } else {
                $location .= '?' . $args;
            }
        }

        if ($is_IIS) {
            @header("Refresh: 0;url=$location");
        } else {
            if (php_sapi_name() != 'cgi-fcgi') {
                status_header($status); // This causes problems on IIS and some
            }
            @header("Location: $location", true, $status);
        }
        exit ();
    }
1022885
protected function redirect($location = null, $statusCode = 302)
    {
        return $this->response->redirect(url($location), true, $statusCode);
    }
293955
public function setSuccessStatus(int $status, string $description = ""): RouteInterface
    {
        $this->statuses[$status] = HttpStatus::create()
            ->setStatus($status)
            ->setDescription($description)
            ->setMainSuccess(true);

        /**
         * This middleware is an "AFTER" middleware, so add it first to be run last...
         */
        return $this->addFirst(new SuccessStatusMiddleware($status));
    }
1077551
public function redirect($to = null, $scope = 'snsapi_base', $state = null)
    {
        $state = $state ? $state : md5(time());
        header('Location:'.$this->url($to, $scope, $state));

        exit;
    }
985970
public function redirectAbs($url, $statusCode = 302)
    {
        $router = $this->getService('Router');
        $router->redirect($url, $statusCode);
        exit;
    }
1268238
public function to($path, $status = 302)
    {
        $this->to = $path;

        $this->response->status($status);

        return $this;
    }
374503
public function redirectTo($path, $status = 302, $headers = array(), $secure = null)
	{
		return $this->redirector->to($path, $status, $headers, $secure);
	}
439695
public function redirectGuest($path, $status = 302, $headers = [], $secure = null)
    {
        respondWith(response()->redirectGuest($path, $status, $headers, $secure));
    }
790858
public function redirectToIntended($default = '/', $status = 302, $headers = [], $secure = null)
    {
        respondWith(response()->redirectToIntended($default, $status, $headers, $secure ));
    }
870270
public function redirect($url, $status = 302)
    {
        if ($status != 302) {
            $this->setStatus($status);
        }
        $this->setHeader('Location', $url);
        $this->sendHeader();
    }
1199699
protected function redirectView($url, $statusCode = Response::HTTP_FOUND, array $headers = [])
    {
        return View::createRedirect($url, $statusCode, $headers);
    }