Answer the question
In order to leave comments, you need to log in
Glue double slashes and issue a 301 redirect, why does it throw out slugs?
Good day, I ran into the issue of gluing duplicates.
I have a link like https://test.ru/rar////rur/rump , where everything is slugs and you need to remove double slashes.
I came across this solution:
#убираем лишние слеши
RewriteCond %{REQUEST_URI} ^(.*?)\/{2,}(.*?)$
RewriteRule . %1/%2 [L,R=301]
RewriteCond %{THE_REQUEST} //
RewriteRule .* /$0 [R=301,L]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question