= 1000) { $path = substr($id,0,3) . '/' . substr($id,3,2) . '/' . $id; } else { $path = substr($id,0,3) . '/' . $id; } if($page) { $path .= '/'.$page; } $path .= '/index.html'; $absolute_filepath = dirname(__FILE__) . '/owners/' . $path; if(!is_file($absolute_filepath)) { header("HTTP/1.0 404 Not Found"); echo file_get_contents($absolute_404_path); exit; } else { echo file_get_contents($absolute_filepath); }