to public/partage/index.php, since the built-in * server has no URL rewriting like nginx's try_files. */ $uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); // Route /partage/ and /partage// to the partage entry if (preg_match('#^/partage(/.*)?$#', $uri)) { $_SERVER['SCRIPT_NAME'] = '/partage/index.php'; require __DIR__ . '/public/partage/index.php'; return true; } // Route /tfe/<...> to tfe.php if (preg_match('#^/tfe(/.*)?$#', $uri)) { $_SERVER['SCRIPT_NAME'] = '/tfe.php'; require __DIR__ . '/public/tfe.php'; return true; } // Default: serve static files if they exist return false;