• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/routing/router.php
  • Класс: BitrixMainRoutingRouter
  • Вызов: Router::getUriPath
protected function getUriPath($request)
{
	// cut GET parameters
	$path = str_replace(
		'?'.$request->getServer()->get('QUERY_STRING'),
		'',
		$request->getRequestUri()
	);

	// cut scheme and domain
	$scheme = $request->isHttps() ? 'https://' : 'http://';
	$schemeLen = strlen($scheme);

	if (substr($path, 0, $schemeLen) === $scheme)
	{
		$pathSlashPos = strpos(substr($path, $schemeLen), '/') + $schemeLen;
		$path = substr($path, $pathSlashPos);
	}

	return $path;
}