public static function getLocationUrl(string $location): string
    {
        if (strpos($location, 'http') === 0) {
            return $location;
        }
        
        $locationUrl = self::getSiteUrl() . $location;
        return preg_replace("#([^:])//+#", "$1/", $locationUrl);
    }
public static function getLocationUrl(string $location): string
    {
        if (strpos($location, 'http') === 0) {
            return $location;
        }
        
        $locationUrl = self::getSiteUrl() . $location;
        return preg_replace("#([^:])//+#", "$1/", $locationUrl);
    }
public static function getLocationUrl ( string $ location ) : string { if ( strpos ( $ location , 'http' ) === 0 ) { return $ location ; } $ locationUrl = self :: getSiteUrl ( ) . $ location ; return preg_replace ( "#([^:])//+#" , "$1/" , $ locationUrl ) ; }
Get the valid fully qualified URL for the specified location.

@param string $location
The location to get the fully qualified URL for.

@return string The fully qualified URL for the specified location.

@see https://tools.ietf.org/html/rfc1738
Get the valid fully qualified URL for the specified location .