Answer the question
In order to leave comments, you need to log in
Why does the product open on any link?
Good afternoon, there is a link: site/projects/category/tovar_2
But it will also open by the link: site/projects/mngjfdnglsnfsgjl/tovar_2
(the main thing is that at the end it should be product_2)
Settings for managing page addresses:
Section page: #SECTION_CODE#/
Detailed view page: #SECTION_CODE#/#ELEMENT_CODE#/
Bitrix news component detail
please tell me how to fix this ?
Answer the question
In order to leave comments, you need to log in
Check in the component settings whether "Strict section checking" is checked
The 404 page is not set up / not created.
You need to create this page, give it the correct titles,
CHTTP::SetStatus("404 Not Found");
@define("ERROR_404","Y");
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