.autoRedirect 1 KB
Newer Older
Laurent Heirendt's avatar
Laurent Heirendt committed
1
2
<html>
  <head>
Laurent Heirendt's avatar
Laurent Heirendt committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
    <script type="text/javascript">
    function UrlExists(url, cb){
        jQuery.ajax({
            url:      url,
            dataType: 'text',
            type:     'GET',
            complete:  function(xhr){
                if(typeof cb === 'function')
                cb.apply(this, [xhr.status]);
            }
        });
    }
    UrlExists('https://r3-core.pages.uni.lu/labCards/index.html', function(status){
        if(status === 200){
            // internal pages
            window.location.href = 'https://r3-core.pages.uni.lu/labCards/stable';
        } else {
            // external pages
            window.location.href = 'https://r3.pages.uni.lu/labCards/stable';
        }
    });
    </script>
Laurent Heirendt's avatar
Laurent Heirendt committed
26
27
28
29
30
31
32
  </head>
  <body>
    <p>
      Please follow to <a href="https://r3.pages.uni.lu/labCards/stable">https://r3.pages.uni.lu/labCards/stable</a>!
    </p>
  </body>
</html>