try this
<?php
$host = $_SERVER['SERVER_NAME'];
if($host == "www.domain1.ch"){
header("Location: http://www.domain1.ch/index1.htm");
}
else if($host == "www.domain2.ch"){
header("Location: http://www.domain2.ch/subfolder2/index.htm");
}
?>