Thread: Web Page Help
View Single Post
  #6   Spotlight this post!  
Unread 25-07-2001, 22:42
mpking's Avatar
mpking mpking is offline
Registered User
AKA: Mike
#0088 (TJ²)
Team Role: Alumni
 
Join Date: Jun 2001
Location: Bridgewater MA
Posts: 144
mpking is an unknown quantity at this point
Send a message via AIM to mpking
Solution is Found

Ok, I called in one of the programming guru's at work, and in trying to explain it to him, I hit apon the solution.

The solution that I've discovered is a combination of Javascript and SSI includes.
Code:
<noscript><meta http-equiv="refresh" content="2; URL=indexresnet.html"></noscript>
<script language="JavaScript">
<!--
var resnetsTargetURL = "https://netreg.bridgew.edu/indexresnet.html";
var allsTargetURL = "https://netreg.bridgew.edu/indexall.html";


function doRedirect()
{
var ip = "REMOTE_ADDR";
if (ip.indexOf("192.168") >= -1)  
        setTimeout( "window.location.href = resnetsTargetURL", 2*1000 );
else
        setTimeout( "window.location.href = allsTargetURL", 2*1000 );
}
//-->
</script>

<script language="JavaScript1.1">
<!--
function doRedirect()
{
var ip = "REMOTE_ADDR";

if (ip.indexOf("192.168") >= -1)  
   window.location.replace( resnetsTargetURL );
else
   window.location.replace( allsTargetURL );
}

doRedirect();

//-->
</script>
of course the <body onload="doRedirect()"> tag is in there too.

Thanks for all your suggestions, you guys at least got me started on the right road.
__________________
Mike King
Bridgewater Raynham Regional High School
Team 88 TJ²
The Home of Moe
Reply With Quote