I use this client side JS at work.

<!DOCTYPE html>
<html>
    <head>
        <title>Redirect Service</title>
        <script>
            var URI = new URLSearchParams(window.location.search).get("target");
            if (URI) {
                window.location.replace(URI);
            }
        </script>
    </head>
    <body>
        <p>This page should not be visible.</p>
        <p>It may be that the "target" parameter is missing, or that JavaScript is not being executed.</p>
    </body>
</html>

P.S it's been 3 years and I still haven't fixed the fact it doesn't properly handle multiple parameters, this is "left as an exercise to the reader". (More like I wrote it in 5 minutes and coding isn't my job, so it works for them and I never bothered since).

We used it because Power BI wouldn't let us call anything other than HTTP/HTTPS links, so instead we throw unsupported links at a page that will open them if Microsoft won't.

5 Likes