mirror: treat /index.php as homepage (fix 404 when opened directly)

这个提交包含在:
JGZYES
2026-08-30 18:32:59 +08:00
父节点 58c6c8b527
当前提交 d61d2a552c
+3 -1
查看文件
@@ -121,7 +121,9 @@ if (preg_match('#^/upload$#', $uri)) {
else { http_response_code(405); echo 'method not allowed'; exit; } else { http_response_code(405); echo 'method not allowed'; exit; }
} }
if ($uri === '/' || $uri === '/index.html') send_file($ROOT . '/index.html', 'text/html; charset=utf-8'); if ($uri === '/' || $uri === '/index.html' || $uri === '/index.php') {
send_file($ROOT . '/index.html', 'text/html; charset=utf-8');
}
if ($uri === '/packages.json' || $uri === '/api/packages.json') send_index(); if ($uri === '/packages.json' || $uri === '/api/packages.json') send_index();
if ($uri === '/mirror.ini' || $uri === '/mirror.conf') { header('Content-Type: text/plain'); echo mirror_ini(); exit; } if ($uri === '/mirror.ini' || $uri === '/mirror.conf') { header('Content-Type: text/plain'); echo mirror_ini(); exit; }