mod_rewrite - remove double slash from url


Well-Known Member

These rules work fine in apache, but they don't work in litespeed (using v4.0.20):

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

The purpose is to remove double (or more) slashes from URLs.

I've played around with it and it seems litespeed is not matching properly in the RewriteCond.

Can someone please help me on this one?