Router.php
private function mount()
    {
        if ($this->method === 'CLI') {
            global $argv;

            if (isset($argv[0]) && $argv[0] == 'index.php') {
                array_shift($argv);
            }

            $this->request = $argv;

            return;
        }
        //Detect SSL access
        if (!isset($_SERVER['SERVER_PORT'])) {
            $_SERVER['SERVER_PORT'] = 80;
        }
        $this->http = (isset($_SERVER['HTTPS']) && ($_SERVER["HTTPS"] == "on" || $_SERVER["HTTPS"] == 1 || $_SERVER['SERVER_PORT'] == 443)) ? 'https://' : 'http://';
        //What's base??!
        $this->base = isset($_SERVER['PHAR_SCRIPT_NAME']) ? dirname($_SERVER['PHAR_SCRIPT_NAME']) : rtrim(str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']), ' /');
        if ($_SERVER['SERVER_PORT'] != 80  && $_SERVER['SERVER_PORT'] != 443) {
            $this->base .= ':' . $_SERVER['SERVER_PORT'];
        }
        
        //URL & REQST Constants:
        if($this->request === false) {
            $this->request = urldecode(isset($_SERVER['REQUEST_URI']) ? urldecode(trim(str_replace($this->base, '', trim($_SERVER['REQUEST_URI'])), ' /')) : '');
        }
        defined('_RQST') || define('_RQST', $this->request);

        if($this->url === false) {
            $this->url = isset($_SERVER['SERVER_NAME']) ? $this->http . $_SERVER['SERVER_NAME'] . $this->base . '/' : '';
        }
        defined('_URL') || define('_URL', $this->url);
        
        //Load configurations
        $this->loadConfig();
    }
private function mount()
    {
        if ($this->method === 'CLI') {
            global $argv;

            if (isset($argv[0]) && $argv[0] == 'index.php') {
                array_shift($argv);
            }

            $this->request = $argv;

            return;
        }
        //Detect SSL access
        if (!isset($_SERVER['SERVER_PORT'])) {
            $_SERVER['SERVER_PORT'] = 80;
        }
        $this->http = (isset($_SERVER['HTTPS']) && ($_SERVER["HTTPS"] == "on" || $_SERVER["HTTPS"] == 1 || $_SERVER['SERVER_PORT'] == 443)) ? 'https://' : 'http://';
        //What's base??!
        $this->base = isset($_SERVER['PHAR_SCRIPT_NAME']) ? dirname($_SERVER['PHAR_SCRIPT_NAME']) : rtrim(str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']), ' /');
        if ($_SERVER['SERVER_PORT'] != 80  && $_SERVER['SERVER_PORT'] != 443) {
            $this->base .= ':' . $_SERVER['SERVER_PORT'];
        }
        
        //URL & REQST Constants:
        if($this->request === false) {
            $this->request = urldecode(isset($_SERVER['REQUEST_URI']) ? urldecode(trim(str_replace($this->base, '', trim($_SERVER['REQUEST_URI'])), ' /')) : '');
        }
        defined('_RQST') || define('_RQST', $this->request);

        if($this->url === false) {
            $this->url = isset($_SERVER['SERVER_NAME']) ? $this->http . $_SERVER['SERVER_NAME'] . $this->base . '/' : '';
        }
        defined('_URL') || define('_URL', $this->url);
        
        //Load configurations
        $this->loadConfig();
    }
Mount