<?php
if (isset($_SERVER['HTTP_HOST']) && $_SERVER['HTTP_HOST']!=='') {
  $domain=$_SERVER['HTTP_HOST'];
}
else {
  $domain='';
}
$content=array(
  'nucloud.ch' => 'cloud',
  'nuhost.ch' => 'hosting',
  'numail.net' => 'mail',
  'nubackup.ch' => 'backup',
);
if (preg_match('/^(www\.)?('.implode('|',array_keys($content)).')/i',$domain,$m)) {
  header('Location: nux.php?c='.$content[$m[2]]);
}
else {
  header('Location: nux.php');
}
?>
