Greetings
We have, say, the following Bitrix site structure:
<a href="http://site.ru/poezda">Поезда</a> <a href="http://site.ru/poezda/poezd1">Поезд 1</a> <a href="http://site.ru/poezda/poezd2">Поезд 2</a> <a href="http://site.ru/kontakty">Контакты</a> <!-- В конце ссылок нет слешей --> When clicking on the first (Train) or last (Contacts) links, a slash is added to the end of the address bar, i.e. it turns out http://site.ru/poezda/ or http://site.ru/kontakty/ respectively.I understand this is due to the fact that these are "Sections" (Folders that contain .section.php and index.php files)
Can you please tell me how to get rid of these slashes at the end?
PS Standard .htaccess file contains these lines for routing:
<IfModule mod_rewrite.c> Options +FollowSymLinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-l RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !/bitrix/urlrewrite.php$ RewriteRule ^(.*)$ /bitrix/urlrewrite.php [L] RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}] </IfModule> UPD :
when adding a rule to urlwrite.php, nothing has changed: (
$arUrlRewrite = array( array( "CONDITION" => "#^/poezda#", "PATH" => "/poezda/index.php", ) ); in CONDITION tried to specify various variations, such as #^/poezda# , #^/poezda , /poezda , etc.
UPD 2
When you try to add a file (and not a section) and describe a rule, a slash is still added at the end. How to overcome this rule?