Avoid double slash after the domain part

Fixes passing things like '/index.php' in $url