how to remove multiple slashes in URI with 'PREG' or 'HTACCESS'
site.com/edition/new/// -> site.com/edition/new/
site.com/edition///new/ -> site.com/edition/new/
thanks
$url = 'http://www.abc.com/def/git//ss';
$url = preg_replace('/([^:])(\/{2,})/', '$1/', $url);
// output http://www.abc.com/def/git/ss
$url = 'https://www.abc.com/def/git//ss';
$url = preg_replace('/([^:])(\/{2,})/', '$1/', $url);
// output https://www.abc.com/def/git/ss