static function redirectInstallMode($redirectUrl = '/campaignchain/install.php')
    {
        // Only apply if in request context.
        if(isset($_SERVER['REQUEST_URI'])) {
            if (
                self::isInstallMode() &&
                false === strpos($_SERVER['REQUEST_URI'], '/install/')
            ) {
                // System is not installed yet and user wants to access
                // a secured page. Hence, redirect to Installation Wizard.
                header('Location: '.$redirectUrl);
                exit;
            } elseif (
                // System is installed and user wants to access the Installation
                // Wizard. Hence, redirect to login page.
                !self::isInstallMode() &&
                0 === strpos($_SERVER['REQUEST_URI'], '/install/')
            ) {
                header('Location: /');
                exit;
            }
        }
    }