Код |
---|
"SEF_URL_TEMPLATES" => array( "detail" => "#ELEMENT_CODE#/", ) |
Код |
---|
array( "CONDITION" => "#^/news/#", "RULE" => "", "ID" => "bitrix:news", "PATH" => "/news/index.php", ), |
Код |
---|
<? require ($_SERVER["DOCUMENT_ROOT"]."/bitrix/header.php"); $res = CIBlockElement::GetByID($_GET["ELEMENT_ID"]); if($ar_res = $res->GetNext()) } LocalRedirect("/news/'.$ar_res['CODE'].'/", ,301 Moved permanently); } require ($_SERVER["DOCUMENT_ROOT"]."/bitrix/footer.php"); ?> |
Код |
---|
<? require ($_SERVER["DOCUMENT_ROOT"]."/bitrix/header.php"); $res = CIBlockElement::GetByID($_GET["ELEMENT_ID"]); if($ar_res = $res->GetNext()) { LocalRedirect("/news/".$ar_res['CODE']."/", false, "301 Moved permanently"); } require ($_SERVER["DOCUMENT_ROOT"]."/bitrix/footer.php"); ?> |
Код |
---|
array( "CONDITION" => "#^/news/(\\d+)/#", "RULE" => "ELEMENT_ID=$1", "ID" => "", "PATH" => "/news/newsredir.php", ), |