public function getRoot()
    {
        $requestUri = $this->getRequestUri();
        $pathInfo = $this->getPathInfo();

        // remove query string from REQUEST_URI, if set
        if (false !== $qPos = mb_strpos($requestUri, '?')) {
            // has query string
            $requestUri = mb_substr($requestUri, 0, $qPos + 1);
        }

        // remove PATH_INFO from REQUEST_URI, if set
        if (false !== $pPos = mb_strrpos($requestUri, $pathInfo)) {
            // has PATH_INFO
            $requestUri = mb_substr($requestUri, 0, $pPos + 1);
        }

        return $requestUri;
    }