Redirige el navegador a la URL especificada.

@param string $url
@param int $estadoHttp
@return self
425006
public function redirigir($url, $estadoHttp = 302)
    {
        $this->definirCabecera('Location', $url);
        $this->definirEstadoHttp($estadoHttp);
        $this->definirContenido(null);
        return $this;
    }
657645
public function setUrl($url)
    {
        // validate url
        if (filter_var($url, FILTER_VALIDATE_URL)) {
            $this->url = $url;
        } else {
            throw new InvalidUrlException('"' . $url . '" is not a valid URL');
        }

        return $this;
    }
150856
public function setUrl($url)
    {
        $this->urlAbsolute = preg_replace('#/$#', '', $url);

        if ($this->urlRelative === null) {
            $this->urlRelative = $this->urlAbsolute;
        }

        return $this;
    }
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;
    }
11076
public function setWebHook($url)
    {
        $this->data->target = $url;
        $this->data->media = self::DEFAULT_MEDIA;

        return $this;
    }
650195
public function setUrl(string $url)
    {
        $this->url = $url;
        $this->connection = curl_init($url);

        return $this;
    }
467038
public function setUrl(UrlContract $url)
    {
        $this->url = $url;
        $this->dirExists = null;
        return $this;
    }
497685
public function setRedirectUrl($redirectUrl = '')
    {
        $this->redirectUrl = $redirectUrl;
        $this->debug->debug(__FUNCTION__, 'setRedirectUrl: ' . json_encode($this->redirectUrl));

        return $this;
    }
321096
public function redirect($url, $statusCode = 302) {
		$this->setStatusCode($statusCode)
			->setHeader('Location', $url)
			->setBody(sprintf('<!DOCTYPE html>
<meta charset="UTF-8">
<meta http-equiv="refresh" content="1;url=%1$s">
<title>Redirecting to %1$s</title>
Redirecting to <a href="%1$s">%1$s</a>', htmlspecialchars($url, ENT_QUOTES, 'UTF-8')));

		return $this;
	}
227951
public function init(String $url = NULL) : CURL
    {
        if( $url !== NULL && ! IS::URL($url) )
        {
            $url = Request::getSiteURL($url);
        }

        $this->init = curl_init($url);

        return $this;
    }
696375
public function setUrl($url)
    {
        if (strlen($url) == 0) {
            throw new \InvalidArgumentException(sprintf('Enclosure URL should not be empty'));
        }

        $this->url = $url;

        return $this;
    }
1369876
public function setUrl($url)
    {
        $this->currentUrl = $url;
        $this->misc->setUrl($url);

        return $this;
    }
1082745
public function addUrl(Url $url)
    {
        if (!$this->urls->contains($url)) {
            $this->urls->add($url);
            $url->setSiteroot($this);
        }

        return $this;
    }
1344313
public function urlDoesNotRedirect($url)
    {
        if ('/' === $url) {
            $url = '';
        }

        // We must not follow all redirects, so save current situation,
        // force disable follow redirects, and revert at the end.
        $followsRedirects = $this->isFollowingRedirects();
        $this->followRedirects(false);

        $response       = $this->sendHeadAndGetResponse($url);

        if (null !== $response) {
            $responseCode   = $response->getStatus();
            $locationHeader = $response->getHeader('Location', true);

            // Check for 200 response code.
            $this->assertEquals(200, $responseCode, 'Response code was not 200.');

            // Check that destination URL does not try to redirect.
            // Somewhat redundant, as this should never appear with a 200 HTTP Status code anyway.
            $this->assertNull($locationHeader, 'Location header was found when it should not exist.');
        }

        $this->followRedirects($followsRedirects);
    }
1192816
public function setUrl($url)
    {
        if (!is_null($url)) {
            if (!preg_match('@^https?://@', $url)) {
                throw new \InvalidArgumentException(sprintf('Invalid url: %s', $url));
            }

            $this->url = $url;
        } else {
            $this->url = null;
        }

        return $this;
    }
640755
protected function redirect($url, $status = 302)
    {
        return $this->getResponse()
            ->withStatus($status)
            ->withHeader('Location', (string)$url);
    }
613582
public function removeUrl(Url $url)
    {
        if ($this->urls->contains($url)) {
            $this->urls->removeElement($url);
            $url->setSiteroot(null);
        }

        return $this;
    }