<html xmlns="http://www.w3.org/1999/xhtml">

<head>
  <title>Redirect</title>
  <script type="text/javascript">
    var redirects = <%= JSON.stringify(redirects) %>;
    var hash = window.location.hash.startsWith('#') ? window.location.hash.slice(1) : window.location.hash;
    var redirect = redirects[hash] || redirects[""] || "/";
    window.document.title = 'Redirect to  ' +  redirect;
    if (!redirects[hash]) {
      redirect = redirect + window.location.hash;
    }
    redirect = redirect + window.location.search;
    window.location.replace(redirect);
  </script>
</head>

<body>
</body>

</html>