Current Path : /var/www/u0635749/data/www/hobbyclick.ru/public/bitrix/ |
Current File : /var/www/u0635749/data/www/hobbyclick.ru/public/bitrix/urlrewrite_my.php |
<? require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php"); global $APPLICATION; $GetCurPage = $APPLICATION->GetCurPage(); CModule::IncludeModule('iblock'); CModule::IncludeModule('sale'); CModule::IncludeModule('catalog'); global $APPLICATION; $arFilter686 = Array("ACTIVE"=>'Y',"IBLOCK_ID"=>25,"PROPERTY_zhel"=>trim($GetCurPage)) ; $res588 = CIBlockElement::GetList(Array("SORT"=>"desc"), $arFilter686, false, false, false); $ob788 = $res588->GetNextElement(); if ($ob788) { $arItem670889 = $ob788->GetFields(); $arProp4500889 = $ob788->GetProperties(); $un=trim($arProp4500889['zhel']['VALUE']); $re=trim($arProp4500889['ori']['VALUE']); if($GetCurPage == $un) { $application = \Bitrix\Main\Application::getInstance(); $context = $application->getContext(); $request = $context->getRequest(); $Response = $context->getResponse(); $Server = $context->getServer(); $server_get = $Server->toArray(); $server_get["REQUEST_URI"] =$re; $Server->set($server_get); $context->initialize(new Bitrix\Main\HttpRequest($Server, array(), array(), array(), $_COOKIE), $Response, $Server); $requestURL = $APPLICATION->GetCurPage(true); $requestURL1 = Bitrix\Main\Context::getCurrent()->getRequest()->getRequestedPage(); $_SERVER['REQUEST_URI'] = $re; $APPLICATION->reinitPath(); } } $GetCurPage = $APPLICATION->GetCurPage(); include_once($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/include/urlrewrite.php'); if(file_exists($_SERVER['DOCUMENT_ROOT'].'/404.php')) include_once($_SERVER['DOCUMENT_ROOT'].'/404.php'); ?>