@@ -392,7 +392,7 @@ function qualifyURL($url, $return = false)
$url = $protocol . getServer() . $url;
}
// Get Digest
- $digest = parse_url(preg_replace('/\s+/', '', $url));
+ $digest = parse_url(rtrim(preg_replace('/\s+/', '', $url), '/'));
// http/https
if (!isset($digest['scheme'])) {
if (isset($digest['port']) && in_array($digest['port'], array(80, 8080, 8096, 32400, 7878, 8989, 8182, 8081, 6789))) {
@@ -408,7 +408,7 @@ function qualifyURL($url, $return = false)
// Port
$port = (isset($digest['port']) ? ':' . $digest['port'] : '');
// Path
- $path = (isset($digest['path']) && $digest['path'] !== '/' ? $digest['path'] : '');
+ $path = (isset($digest['path']) ? $digest['path'] : '');
// Output
$array = array(
'scheme' => $scheme,