How to set a rule in UrlRewrite Bitrix?

Tell me how in the UrlRewrite file to make the following url shortening

The website -> Page with component catalog -> Category -> Product

The task of the next.
1. When you log on to the page - everything is as it should open. (i.e. the Directory categories)
2. When navigating to the category url to a view
3. When you click on item in the category the url was kind of

That is when you click on a category or product url to a decrease of the paragraph catalog.

I will be very grateful! For earlier thanks!
June 26th 19 at 13:57
2 answers
June 26th 19 at 13:59
Resolved the issue thanks to the pickup and then at random.
"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 report! Thank you all!
If you have = make sure that and really are processed by the same component and not fly to 404 - Gretchen40 commented on June 26th 19 at 14:02
Yes, like all good works - Displays a list of categories. and when you click on any category also work out fine.

Only now I understand you need to follow to avoid overlaps in the names of the categories and sections at the root - Oceane commented on June 26th 19 at 14:05
: Yes, right. Judging by your setup, a directory component now hung on a root folder, so the possible intersections. - Gretchen40 commented on June 26th 19 at 14:08
June 26th 19 at 14:01
In UrlRewrite is only the entry point into a complex component, and the formation of the NC links need to be configured in the component, not UrlRewrite.
That is coming back to my pies

From the docks I realized. when forming the url, you need to rule SEF_FOLDER=/catalog/ . But it is necessary for me when switching to a list of categories.

There are options to solve my problem? - Gretchen40 commented on June 26th 19 at 14:04
I think if I understood You correctly. you have to add in the array of input parameters the following piece
 "sections" => "#PATH#",
 "section_edit" => "folder/edit/#SECTION_ID#/#ACTION#/",
 "element" => "element/view/#ELEMENT_ID#/",
 "element_edit" => "element/edit/#ACTION#/#ELEMENT_ID#/",
 "element_history" => "element/history/#ELEMENT_ID#/",
 "element_history_get" => "element/historyget/#ELEMENT_ID#/#ELEMENT_NAME#",
 "element_upload" => "element/upload/#SECTION_ID#/",
 "user_view" => "/company/personal/user/#USER_ID#/",
 "connector" => "connector/",
 "help" => "help",
 "search" => "search/"

But how to configure it that would have solved my problem what I can not understand.

Now my piece looks like this
 "sections" => "",
 "section" => "#SECTION_CODE#/",
 "element" => "#SECTION_CODE#/#ELEMENT_CODE#/",
 "compare" => "compare.php?action=#ACTION_CODE#",
 "smart_filter" => "#SECTION_CODE#/filter/#SMART_FILTER_PATH#/apply/",
- Oceane commented on June 26th 19 at 14:07

Find more questions by tags 1C-Bitrix