• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/engine/response/redirect.php
  • Класс: BitrixMainEngineResponseRedirect
  • Вызов: Redirect::processInternalUrl
private function processInternalUrl($url)
{
	/** @global CMain $APPLICATION */
	global $APPLICATION;
	//store cookies for next hit (see CMain::GetSpreadCookieHTML())
	$APPLICATION->StoreCookies();

	$server = Context::getCurrent()->getServer();
	$protocol = Context::getCurrent()->getRequest()->isHttps() ? "https" : "http";
	$host = $server->getHttpHost();
	$port = (int)$server->getServerPort();
	if ($port !== 80 && $port !== 443 && $port > 0 && strpos($host, ":") === false)
	{
		$host .= ":" . $port;
	}

	return "{$protocol}://{$host}{$url}";
}