public function sslRedirect()
    {
        if (!$this->isSecure()) {
            $redirect = 'https://' . $this->server['HTTP_HOST'] . $this->server['REQUEST_URI'];

            header('HTTP/1.1 301 Moved Permanently');
            header('Location: ' . $redirect);
            exit();
        }
    }