From d61d2a552c81135ba223c49dc9535ab4df859e33 Mon Sep 17 00:00:00 2001 From: JGZYES Date: Sun, 30 Aug 2026 18:32:59 +0800 Subject: [PATCH] mirror: treat /index.php as homepage (fix 404 when opened directly) --- mirror/index.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mirror/index.php b/mirror/index.php index 5632997..a1213b0 100644 --- a/mirror/index.php +++ b/mirror/index.php @@ -121,7 +121,9 @@ if (preg_match('#^/upload$#', $uri)) { 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 === '/mirror.ini' || $uri === '/mirror.conf') { header('Content-Type: text/plain'); echo mirror_ini(); exit; }