public function redirect($url, $code = HTTP_FOUND, $message = "Moved Permanently", $alerts = [])
    {

        $response = $this->application->response;
        $uri = $this->application->createInstance(Uri::class, [$this->application->request]);

        //Before we redirect, if there are any alerts in the response,
        //Exceptional: Store alerts for future display
        if (!empty($alerts)) {
            $session = $this->application->session;

            //$session->unlock("default"); //unlock the default namespace
            $session->set("alerts", $alerts, "default");
            //$session->update( $session->getId() );
        }

        $response->setStatusCode($code);
        $response->setStatusMessage($message);
        $response->addHeader("Location", $uri->internalize($url));

        $response->sendRedirect();

        $this->abort();
    }