uri(0); // redirect depending on installation status installRedirect($route); // route to the relevant module if ($route == '/') return HomeModule::home(); if ($route == 'install') return InstallModule::handle(); if ($route == 'gate') return GateModule::handle(); // 404 http_response_code(404); echo '404: ' . $route;