Answer the question
In order to leave comments, you need to log in
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
In the .htaccess file
After the command RewriteEngine On
RewriteCond %{REQUEST_URI} ^(.*)/{2,}(.*)$
RewriteRule . %1/%2 [R=301,L]
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]
# Исключаем все лишние слеши.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question