I
I
I'm Yoda2019-02-05 10:08:08
1C-Bitrix
I'm Yoda, 2019-02-05 10:08:08

How to bypass 404 in this case?

Hello connoisseurs!
Made a non-standard transition from one page to another . Everything worked until I set up the 404 to work. How to make the transition from element to element work?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya, 2019-02-05
@Anadi

How to make transition from element to element work?

Easily. Turn off the 404 setting for your component (in the component parameters). And in the template, in the place where you parse the URL to get the symbolic code of the associated element, add one more check: if the parsing was successful and the element exists, we perform the necessary actions, otherwise we generate a 404 error.
In short: You need to disable 404 handling for the component and take over.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question