Answer the question
In order to leave comments, you need to log in
Bitrix elements duplicates. How to fix?
On the site, all the elements are in subsections,
the path should be "root/section/subsection/element"
And in fact, the detailed page opens both along this path:
"root/section/subsection/element"
and this:
"root/section/ element"
Is it possible to make the second option open 404?
Or just specify canonical?
Answer the question
In order to leave comments, you need to log in
There are a lot of options
- there is a setting "specify the main section"
- 301 redirect
- canonical
This is not a problem with the infoblock or component settings. The problem is in the architecture or routing configuration.
If, in principle, you have a situation where some goods are on the first level of the section, i.e. you have products that have such a path root / section / subsection / element does not work in principle, because there is no subsection, then the problem is in the architecture and it cannot be solved, as it contradicts it.
Simply put - how should the system, without referring to the catalog, distinguish a product that has a subsection from a product that does not have a subsection? It's impossible. There is only one option - throw 404 in the detailed display script if the product is not opened at the canonical address. Those. modify the catalog detail view component.
If, for ANY product, a path of the form root/section/subsection/element can be formed, i.e. the canonical path of any product ALWAYS includes a section and one subsection, then the problem is easily solved by manually setting urlrewrite
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question