A
A
Alexander2021-04-13 23:09:05
1C-Bitrix
Alexander, 2021-04-13 23:09:05

How to set up the CNC of the Bitrix catalog and redirection?

You need to remove the slash at the end of the line address. those. site.ru/catalog and site.ru/catalog/section
On regular sections with index.php made in .htaccess

<IfModule mod_rewrite.c>
Options +FollowSymLinks
  RewriteEngine On
  RewriteBase /
DirectorySlash Off
RewriteCond %{SCRIPT_FILENAME} -d
RewriteRule ^(.+[^/])$ /$1/ [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !\..{1,10}$
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*)$ https://site.ru/$1/ [L,R=301]

works

further I change the component, remove the slash at the end
"SEF_URL_TEMPLATES" => array(
"sections" => "",
"section" => "/#SECTION_CODE_PATH#",
"element" => "/#SECTION_CODE_PATH#/#ELEMENT_CODE#",
"compare" => "compare.php?action=#ACTION_CODE#",
"smart_filter" => "/#SECTION_CODE_PATH#/filter/#SMART_FILTER_PATH#/apply/",
),

I get 404.
what's wrong? how and where to dig?
on vds if that

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Viktor Taran, 2021-04-14
@kikher

Wrote here
https://klondike-studio.ru/standards/standartnyy-h...

I
IgorVader, 2021-04-14
@IgorVader

https://dev.1c-bitrix.ru/api_help/main/general/url...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question