I currently have 2 web departamental intranet servers.
The second server is acting as a backup.
From our main corporate page, I would like redirect to the first server. If the first server is not available, I do not want to see the classic "HTTP 404 - File not found". Instead, I would like to get redirected to the second server.
I have created a sample code (shown below), but I still get the 404 error instead ob being redirected to the second server.
<html>
<head>
<title>Redirect Page - Sample Code</title>
</head>
<script language="JavaScript">
onError = SecondLink()
window.location="
function SecondLink() {
window.location="}
</script>
<body >
You should be redirected to another page shortly.<br>
If the redirection does not take place (your browser may be not configured for JavaScript), please click <a href=" here </a>to get redirected.<br><br>
If the URL above did not work, please click <a href=" here </a>to get redirected.
</body>
</html>
The second server is acting as a backup.
From our main corporate page, I would like redirect to the first server. If the first server is not available, I do not want to see the classic "HTTP 404 - File not found". Instead, I would like to get redirected to the second server.
I have created a sample code (shown below), but I still get the 404 error instead ob being redirected to the second server.
<html>
<head>
<title>Redirect Page - Sample Code</title>
</head>
<script language="JavaScript">
onError = SecondLink()
window.location="
function SecondLink() {
window.location="}
</script>
<body >
You should be redirected to another page shortly.<br>
If the redirection does not take place (your browser may be not configured for JavaScript), please click <a href=" here </a>to get redirected.<br><br>
If the URL above did not work, please click <a href=" here </a>to get redirected.
</body>
</html>