src/CarteBlanche/App/Kernel.php
private function __getHttpRoot()
    {
        if (!defined('_ROOTHTTP')) {
            $_roothttp = '';
            if (isset($_SERVER['HTTP_HOST']) && !empty($_SERVER['HTTP_HOST'])) {
                $_roothttp = (isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS'])!='off') ? 'https://' : 'http://';
                $_roothttp .= $_SERVER['HTTP_HOST'];
            }
            if (isset($_SERVER['PHP_SELF']) && !empty($_SERVER['PHP_SELF'])) {
                $_roothttp .= str_replace( '\\', '/', dirname($_SERVER['PHP_SELF']));
            }
            if (strlen($_roothttp)>0 && substr($_roothttp, -1) != '/') $_roothttp .= '/';
            define('_ROOTHTTP', $_roothttp);
        }
    }
private function __getHttpRoot()
    {
        if (!defined('_ROOTHTTP')) {
            $_roothttp = '';
            if (isset($_SERVER['HTTP_HOST']) && !empty($_SERVER['HTTP_HOST'])) {
                $_roothttp = (isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS'])!='off') ? 'https://' : 'http://';
                $_roothttp .= $_SERVER['HTTP_HOST'];
            }
            if (isset($_SERVER['PHP_SELF']) && !empty($_SERVER['PHP_SELF'])) {
                $_roothttp .= str_replace( '\\', '/', dirname($_SERVER['PHP_SELF']));
            }
            if (strlen($_roothttp)>0 && substr($_roothttp, -1) != '/') $_roothttp .= '/';
            define('_ROOTHTTP', $_roothttp);
        }
    }
Retrieve the base URL to use to construct the application routes (found from the current domain and path URL)