A
A
Andrey Salnikov2017-04-27 13:49:20
MODX
Andrey Salnikov, 2017-04-27 13:49:20

How to remove multiple slashes at the end of a URL?

https://sitename.ru///
I can't remove extra slashes at the end of this URL. Help me please.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
Dmitry Grabko, 2017-04-27
@Shshzik

In the .htaccess file
After the command RewriteEngine On
RewriteCond %{REQUEST_URI} ^(.*)/{2,}(.*)$
RewriteRule . %1/%2 [R=301,L]

D
display: block, 2017-04-27
@qork

https://sitename.ru/
No thanks.

spoiler
petrosyan-2.jpg

V
Viktor Taran, 2017-04-27
@shambler81

And here it is not.
does not always work, moreover, with logic, indeed, all the rules.
It just doesn't work.
Problems with urls of partially built cnc's

RewriteCond %{THE_REQUEST} //
   # Проверяем, повторяется ли слеш (//) более двух раз.
RewriteRule .* /$0 [R=301,L]
   # Исключаем все лишние слеши.

A
arkadiyru, 2021-02-26
@arkadiyru

Bullshit razmusolivaet, at least checked? On opencart, not one option is suitable.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question