B
B
bossigorxxx2020-08-06 12:43:45
1C-Bitrix
bossigorxxx, 2020-08-06 12:43:45

How to make section links without a slash at the end of bitrix?

Good afternoon. You need to make section links without a slash at the end of bitrix, except for the directory. Now if you remove the product or section / Then it shows a 404 error.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
Har8iunian, 2020-08-06
@Har8iunian

In the .htaccess file, in the mod_dir section, add the
DirectorySlash Off
line . In the mod_rewrite section, add the lines
RewriteCond %{REQUEST_URI} ^.*[^/]$
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI}/index.php -f
RewriteRule ^(.*) $ /$1/index.php [L]

Should work

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question