private function isPubDirectory($sitePath, $route, $pub = '')
    {
        $sitePath .= '/pub/';
        $dirs = glob($sitePath . '*', GLOB_ONLYDIR);

        $dirs = str_replace($sitePath, '', $dirs);
        foreach ($dirs as $dir) {
            if (strpos($route, $pub . $dir . '/') === 0) {
                return true;
            }
        }
        return false;
    }