} if(strlen($SITE_ID) > 0) { $dbSite = Main\SiteTable::getByPrimary($SITE_ID); $arSite = $dbSite->fetch(); if(!is_array($arSite)) { $SITE_ID = ''; } else { $arSite['DOMAINS'] = array(); $robotsFile = new RobotsFile($SITE_ID); if($robotsFile->isExists()) { $arHostsList = $robotsFile->getRules('Host'); foreach ($arHostsList as $rule) { $host = $rule[1]; if(strncmp($host, 'https://', 8) === 0) { $host = substr($host, 8); $bDefaultHttps = true; } $arSite['DOMAINS'][] = $host; } } if($arSite['SERVER_NAME'] != '')