protected function parsePath($path)
    {
        $path = parse_url(substr(strstr(";" . $path, ";" . $this->basepath), strlen(";" . $this->basepath)), PHP_URL_PATH);

        if ($path === false) {
            throw new Exception("Seriously malformed URL passed to route matcher.");
        }

        return $path;
    }