A
A
Alex Sokol2018-12-27 16:12:28
1C-Bitrix
Alex Sokol, 2018-12-27 16:12:28

How to make the server response be 404 by condition?

In Bitrix, when typing a URL with ?PAGEN_1=2 or in general ?PAGEN_2=36 , although the news.list component contains NEW_COUNT =>9999
, that is, without pagination at all, it still displays the page, but 404.php
should not be a redirect, namely server status 404

Answer the question

In order to leave comments, you need to log in

4 answer(s)
M
Marat Garifullin, 2018-12-27
@magarif

See if there is a check mark in the settings of the main module
Also in the settings of the component there is a setting
5c24d11aa0db4696740120.png

2
2cha.headz, 2018-12-27
@glagolew059

read here
onlinebd.ru/blog/1s-bitriks-pravilnaya-nastroika-stranicy-404

I
Ilya, 2018-12-27
@jasper-blondin

?PAGEN_1=2 are normal GET request parameters. Anything can be there (?NAME=WASYA&AGE=12).
Which leads to a reasonable question: Do you want to disable the use of GET parameters in URLs? Then Bitrix has nothing to do with it. It is unlikely that the developers have provided the opportunity to implement such an amazing quirk.

L
latishew, 2019-01-09
@latishew

In the template you create component_epilog.php in it your condition, and the method adds the status.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question