A
A
Andrey Eskov2017-05-12 08:05:07
1C-Bitrix
Andrey Eskov, 2017-05-12 08:05:07

How to correctly set the UrlRewrite rule in Bitrix?


Tell me how can I make the following abbreviation url in the UrlRewrite
file =================
site.ru/catalog/category/product/
Site -> Page with catalog component -> Category -> Product
========== ===========================================
The task is as follows.
1. When you enter the site.ru/catalog page, everything should open as it should. (i.e. Catalog of categories)
2. When you go to the category url, so that it takes the form site.ru/category/
3. When you go to the product in the category, the url looks like site.ru/category/product/
That is, when you go to the category or a product so that the url is abbreviated by the item catalog.
I will be very grateful to you! Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Eskov, 2017-05-12
@taurus2790

I solved the issue thanks to the tip xzdshr and then the poke method.

"SEF_MODE" => "Y",
        "SEF_FOLDER" => "/",
        "SEF_URL_TEMPLATES" => array(
            "sections" => "catalog/",
            "section" => "#SECTION_CODE#/",
            "element" => "#SECTION_CODE#/#ELEMENT_CODE#/",
            "compare" => "compare.php?action=#ACTION_CODE#",
            "smart_filter" => "#SECTION_CODE#/filter/#SMART_FILTER_PATH#/apply/",
        ),

If someone is aware of the shortcomings of this method, please let me know! Thanks to all!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question