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