Answer the question
In order to leave comments, you need to log in
How to solve the problem with url in bitrix?
Does anyone know how to deal with such a problem in Bitrix, pages open with an arbitrary set of characters at the end: teplo-gorod.ru/news/dtxnhjtjfrytk and so on in the "gallery", "news" and "articles" sections?
Answer the question
In order to leave comments, you need to log in
see what you have specified in the infoblock settings and component settings
The response header is 404 not found, which means you need to set up a template for error output
init.php
AddEventHandler('main', 'OnEpilog', '_Check404Error', 1);
function _Check404Error(){
if (((defined('ERROR_404') && ERROR_404 == 'Y') || preg_match('~404~ius', CHTTP::GetLastStatus())) && !defined('ADMIN_SECTION')) {
global $APPLICATION;
$APPLICATION->RestartBuffer();
$APPLICATION->AddChainItem("Ошибка 404");
include $_SERVER['DOCUMENT_ROOT'] . SITE_TEMPLATE_PATH . '/header.php';
include $_SERVER['DOCUMENT_ROOT'] . '/404.php';
include $_SERVER['DOCUMENT_ROOT'] . SITE_TEMPLATE_PATH . '/footer.php';
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question