"rhf" , "www.registerhotfix.com" => "rhf" , "selectmeetingday.com" => "smd","www.selectmeetingday.com" => "smd","paulvanvelthoven.nl" => "paul","www.paulvanvelthoven.nl" => "paul", "www.rubyhost.nl" => "ruby", "skatespots.net" => "skate" , "www.skatespots.net" => "skate" , "standaard" => "standaard" , "www.hannekefokkelman.com" => "han" , "hannekefokkelman.com" => "han"); $sitemap = $sites[$_SERVER['HTTP_HOST']]; if(!$sitemap) { $sitemap = "standaard"; } $basedir = "/home/vhosting/r/vhost0011069/domains/skatespots.net/htdocs/site/".$sitemap."/"; $bestand = $_SERVER["REDIRECT_URL"]; if(!$bestand) { $isIndex = true; $fileTest = $startDir . $sitemap . "/index.html"; if(is_file($fileTest)) { $bestand = "/index.html"; } else { $bestand = "/index.php"; } } elseif(ereg("/$",$bestand)) { $isIndex = true; $fileTest = $startDir . $sitemap . $bestand . "/index.html"; if(is_file($fileTest)) { $bestand .= "/index.html"; } else { $bestand .= "/index.php"; } } else { $isIndex = false; } $map = $startDir . $sitemap; $file = $startDir . $sitemap . $bestand; if(is_file($file)) { $len = filesize($file); $file_extension = strtolower(substr(strrchr($bestand,"."),1)); switch( $file_extension ) { case "pdf": $ctype="application/pdf"; break; case "exe": $ctype="application/octet-stream"; break; case "zip": $ctype="application/zip"; break; case "doc": $ctype="application/msword"; break; case "xls": $ctype="application/vnd.ms-excel"; break; case "ppt": $ctype="application/vnd.ms-powerpoint"; break; case "gif": $ctype="image/gif"; break; case "png": $ctype="image/png"; break; case "jpeg": case "jpg": $ctype="image/jpg"; break; case "mp3": $ctype="audio/mpeg"; break; case "wav": $ctype="audio/x-wav"; break; case "mpeg": case "mpg": case "mpe": $ctype="video/mpeg"; break; case "mov": $ctype="video/quicktime"; break; case "avi": $ctype="video/x-msvideo"; break; case "ico": $ctype="image/x-icon"; break; case "js": $ctype="application/x-javascript"; break; case "css" : $ctype="text/css"; break; } if($ctype) { if(file_extension == "js") { echo "Content-Type: $ctype"; } header("Content-Type: $ctype"); } //header($header); if($file_extension == "php") { include ($file); } else { readfile($file); } } else { echo "$file 404"; } ?>