R
R
random_object2018-05-25 15:49:12
Search Engine Optimization
random_object, 2018-05-25 15:49:12

How to remove several slashes after the URL in Bitrix nestings?

Hello. There is such a problem, it is necessary to remove duplicate urls in the following nesting
site.ru/catalog////
site.ru/catalog/odegda/////
site.ru/catalog/odegda/muzhskay///
and so
on . ready solution. Help!
Current .htaccess

Options -Indexes 
ErrorDocument 404 /404.php

<IfModule mod_php5.c>
  php_flag session.use_trans_sid off
  #php_value display_errors 1
  #php_value mbstring.internal_encoding UTF-8
</IfModule>

<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}]

  #w/0 index.php
  RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
  RewriteRule ^index\.php$ http://site.ru [R=301,L]  
RewriteCond %{REQUEST_URI} ^(.*)/{2,}(.*)$
RewriteRule (.*) %1/%2 [R=301,L]
</IfModule>

<IfModule mod_dir.c>
  DirectoryIndex index.php index.html
</IfModule>

<IfModule mod_expires.c>
  ExpiresActive on
  ExpiresByType image/jpeg "access plus 3 day"
  ExpiresByType image/gif "access plus 3 day"
  ExpiresByType image/png "access plus 3 day"
  ExpiresByType text/css "access plus 3 day"
  ExpiresByType application/javascript "access plus 3 day"  
</IfModule>


RewriteEngine On
RewriteCond %{HTTP_HOST} site.ru
RewriteRule (.*) http://site.ru/$1 [R=301,L]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2018-05-25
@shambler81

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

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question