public static function URI()
    {
        $REDIRECT_QUERY_STRING =
            isset($_SERVER['QUERY_STRING'])
            ? $_SERVER['QUERY_STRING']
            : '';

        $REDIRECT_URL = '';

        if (isset($_SERVER['REQUEST_URI'])) {
            $url_parts = parse_url($_SERVER['REQUEST_URI']);
            $REDIRECT_URL = $url_parts['path'];
        }

        $URI = rtrim(dirname($_SERVER['SCRIPT_NAME']), '/');

        if (substr($REDIRECT_URL, 0, strlen($URI)) == $URI) {
            $URI = substr($REDIRECT_URL, strlen($URI));
        }

        $URI = urldecode($URI) . '/';

        $URI = trim($URI, '/');

        $parameters = [];

        //Extract parameters from QUERY string
        parse_str($REDIRECT_QUERY_STRING, $parameters);

        return [$URI, $parameters];
    }