48 if (defined(
"SITE_SERVER_NAME") && SITE_SERVER_NAME)
50 $host = SITE_SERVER_NAME;
55 \Bitrix\Main\Config\Option::get(
'main',
'server_name',
Context::getCurrent()->getServer()->getHttpHost())
61 if($port != 80 && $port != 443 && $port > 0 && mb_strpos($host,
':') ===
false)
65 elseif($protocol ===
'http' && $port == 80)
67 $host = str_replace(
':80',
'', $host);
69 elseif($protocol ===
'https' && $port == 443)
71 $host = str_replace(
':443',
'', $host);
74 return $protocol .
'://' . $host;