I
I
Ilya Beloborodov2015-12-22 16:21:03
Apache HTTP Server
Ilya Beloborodov, 2015-12-22 16:21:03

How to remove two or more slashes from a URL?

htaccess has this

RewriteBase /
RewriteCond %{REQUEST_URI} /$ [NC]
RewriteRule ^(.*)(/)$ $1 [R=301,L]

A redirect occurs only if there is one slash at the end, but if there are two or more - no.
Tell me how to set it up if there are a lot of slashes at the end

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question