<?php

#  Use VirtualHostName to determine redirect destination.


#  Redirection Table - Set destination for each Virtual Host Name
#
#  In this example:
#
#   Virtual Host "web.uconn.edu"     points to  "http://students.uconn.edu/
#   Virtual Host "secure.uconn.edu"  points to  "http://www.uconn.edu/academics.html"
#
#*********************************************************************************
#                            EDIT FOLLOWING LINES
#*********************************************************************************
$redirect_url["web.uconn.edu"]            = "http://web.uconn.edu/uconn";
$redirect_url["secure.uconn.edu"]         = "http://www.uconn.edu/academics.html";
#*********************************************************************************

#   Obtain virtual host name from environment, and set destination accordingly.
$VIRTUAL_HOST = getenv("HTTP_HOST");
$DESTINATION  = $redirect_url[$VIRTUAL_HOST];

#  If unexpected virtual host name, use first destination.
if ($DESTINATION=="") {
	list($k,$DESTINATION) = each($redirect_url);
}
?>

<html>
<head>
<script language=javascript>
location="<?php echo $DESTINATION?>"
</script>
</head>
<body>
Click <a href="<?php echo $DESTINATION?>">here</a> to goto to 
<b><?php echo $VIRTUAL_HOST?></b>.
</body>
</html>