public function redirect($url)
    {
        // has redirect from upstream
        if (($this->status === 301 || $this->status === 302) && ($this->hasHeader('location'))) {
            return;
        }
        // @fixme need a better solution
        $this->numRedirected--;
        $this->status = 302;
        $this->setHeader('location', $url);
    }
public function redirect($url)
    {
        // has redirect from upstream
        if (($this->status === 301 || $this->status === 302) && ($this->hasHeader('location'))) {
            return;
        }
        // @fixme need a better solution
        $this->numRedirected--;
        $this->status = 302;
        $this->setHeader('location', $url);
    }
public function redirect ( $ url ) { // has redirect from upstream if ( ( $ this -> status === 301 || $ this -> status === 302 ) && ( $ this -> hasHeader ( 'location' ) ) ) { return ; } // @fixme need a better solution $ this -> numRedirected -- ; $ this -> status = 302 ; $ this -> setHeader ( 'location' , $ url ) ; }
Redirect to another url
This method can be used in request callback.
@param string $url target url to be redirected to.
Redirect to another url This method can be used in request callback .