
--------------------
<?php
$list=explode(".",$_SERVER["HTTP_HOST"]);
$c=count($list);
$redir = "";
#if the first part is "mail" or "webmail" redirect to surftown webmail
if ($list[0] == "webmail" || $list[0] == "mail") {
$redir = "webmail.surftown.com";
}
#if the first part is "mobile" redirect to surftown mobile mail
else if ($list[0] == "mobile") {
$redir = "mobile.surftown.com";
}
# If nonexistant subdomain, then redirect to the parent...
else if ($list[$c-2] != "" && $list[$c-1] != "") {
$redir = $list[$c-2] . "." . $list[$c-1];
}
# Referenced by IP? - lets redirect that..
if ($list[$c-2] == "132") {
$redir = "";
}
# Redirecting to our selves? - Lets catch http://www.surftown.com...
if (($redir == "") || ($redir == $_SERVER["HTTP_HOST"])) {
$redir = "www.surftown.com";
}
Header ("Location: http://".$redir."/");
?>
-------------------------
Weiß einer von euch was da los ist?
