A
A
alex4answ2019-03-05 09:30:58
1C-Bitrix
alex4answ, 2019-03-05 09:30:58

UrlRewrite and CNC component news how to set it up correctly?

Good afternoon.
I ran into a problem, it is necessary that the CNC of the catalog be available not relative to the catalog folder, but relative to the root:
Link now:
site.ru/catalog/section/element
It needs to become:
site.ru/section/element
I reconfigure the infoblock:

URL страницы информационного блока: #SITE_DIR#/catalog/ (пробовал и убирать catalog)
URL страницы раздела: #SITE_DIR#/catalog/#SECTION_CODE#/ (так же тут убирал catalog)
URL страницы детального просмотра: #SITE_DIR#/catalog/#SECTION_CODE#/#ELEMENT_CODE#/ ( и тут )

I go to catalog/index.php where the news component is connected, I reconfigure the CNC parameters there:
Каталог ЧПУ (относительно корня сайта): /catalog/ (тут тоже оставлял и пустое поле и просто "/" пробовал)
Страница раздела: #SECTION_CODE#/
Страница детального просмотра:	#SECTION_CODE#/#ELEMENT_CODE#/

Then I go to "Address processing rules" and there I create a new rule:
#^/articles/#  - условие
bitrix:news - компонент
/catalog/index.php - файл

And no matter how it works, I tried different options, but with any CNC is not configured correctly, because "page not found", but it processes the url exactly catalog/index
How to configure the CNC correctly to get the right links?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Larin, 2019-03-05
@alex4answ

well

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question