private function SiteFolderCondition(Site $site)
    {
        $siteUrl = $site->GetUrl();       
        $siteFolder = parse_url($siteUrl, PHP_URL_PATH);
        if ($siteFolder != '' && $siteFolder != '/')
        {
            return new RewriteCondition(new Variable(ServerVariable::RequestUri()), '^' . rtrim($siteFolder, '/') . '/');
        }
        else
        {
            return new RewriteCondition(new Variable(ServerVariable::RequestUri()), '^/');
        } 
        return null;
    }