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 !');
        }
    }
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 !');
        }
    }
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 !' ) ; } }
Redirect on specified url.

@param  string $url
@param  int    $status
@return void
@throws \Exception
Redirect on specified url .