public function getCurrentUrl($queryString = true)
    {
        $rs    = $this->getServer('REQUEST_SCHEME');
        $https = $this->getServer('HTTPS') == 'on' ? true : false;
        $sn    = $this->getServer('SERVER_NAME');
        $port  = $this->getServer('SERVER_PORT');

        $port  = ($port == '80')
            ? ''
            : (($port == 443 && $https)
                ? ''
                : ':' . $port);

        if ($queryString) {
            $ru = rtrim($this->getServer('REQUEST_URI'), '/');
        } else {
            $ru = rtrim(strtok($this->getServer('REQUEST_URI'), '?'), '/');
        }

        $url  = $rs ? $rs : 'http';
        //$url .= $https ? 's' : '';
        $url .= '://';
        $url .= $sn . $port . htmlspecialchars($ru);
        
        return $url;
    }