-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
43 lines (41 loc) · 1.49 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Redirecting...</title>
<style>
body {
background: #111;
color: #eee;
font-family: sans-serif;
text-align: center;
}
</style>
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<script>
// Function to check if the server is available
async function checkServer() {
// try {
let url = `http://125.228.249.66/${window.location.hash ? window.location.hash.slice(1) : ""}`;
// // Sending a request to your server
// const response = await axios({ method: 'head', url });
// // If we get a response, redirect
// if (response.status === 200) {
window.location.href = url;
// }
// } catch (error) {
// // If there's an error, server is likely not available
// console.error('Server not available:', error);
// alert('Server is currently unavailable. Please try again later.');
// }
}
// Run the checkServer function when the page loads
window.onload = checkServer;
</script>
</head>
<body>
<h1>Checking server availability...</h1>
<p>If the server is available, you will be redirected shortly.</p>
</body>
</html>