<% /* this file reads in the appropriate index.htm file in the appropriate directory based upon which domain was used to access this virtual host. $other_domains is an array with the domain as the key and the directory as the value. Greg Speed, July 19, 2004 www.speedsoft.com */ $other_domains = array ( 'creatabase.com' => 'creatabase', 'extranet.creatabase.com' => 'creatabase', 'tzfatnet.co.il' => 'tzfatnet', 'special.co.il' => 'special', 'creatabase.co.il' => 'creatabase', 'cybershekels.com' => 'cybershekels', 'cybershekels.co.il' => 'cybershekels', 'infoscenarios.com' => 'infoscenarios', 'grandmaray.com' => 'grandmaray', 'teleworktools.com' => 'teleworktools', 'blooperbase.com' => 'blooperbase', 'gigglestogo.com' => 'gigglestogo', 'whichoneisme.com' => 'whichoneisme', 'teleworktravel.com' => 'teleworktravel', 'teleworktogo.com' => 'teleworktogo', 'prayerstogo.com' => 'prayerstogo', 'blooperstogo.com' => 'blooperstogo', 'safedblind.org.il' => 'safeblind', 'telavivteleworkers.com' => 'telavivteleworkers', 'clippingstogo.com' => 'clippingstogo', 'groupwaretogo.com' => 'groupwaretogo', 'bugsataglance.com' => 'bugsataglance', 'isradopt.com' => 'isradopt', 'isradopt.org' => 'isradopt', 'bugstogo.com' => 'bugstogo', 'cybersherut.com' => 'cybersherut', 'extranet.cybersherut.com' => 'extranet', 'sherut.co.il' => 'sherut', 'cybersherut.co.il' => 'cybersherut', 'venturestogo.com' => 'venturestogo', ); // remove the leading "www." so that we are left with just the domain name $Http_Host_local = preg_replace('/^www\./', '', $_SERVER['HTTP_HOST']); if (!empty($other_domains[$Http_Host_local])) { $newfile = $_SERVER['DOCUMENT_ROOT'].'/'.$other_domains[$Http_Host_local].'/index.htm'; } else { // this is the default file $newfile = $_SERVER['DOCUMENT_ROOT'].'/tzfatnet/index.htm'; } // use readfile if you want to display the URL without the directory, but this causes trouble with links //readfile($newfile); // use a header location redirect to maintain links if ($Http_Host_local == 'creatabase.com') { readfile($newfile); exit; } header('Location: http://www.'.$Http_Host_local.'/'.$other_domains[$Http_Host_local].'/'); exit; %>