From edb5f03956377c9a5e043cd578c96a3868b037f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9drix?= Date: Thu, 14 May 2026 23:45:24 +0200 Subject: [PATCH] =?UTF-8?q?fix=20#61=20:=20afficher=20les=20r=C3=A9sultats?= =?UTF-8?q?=20de=20recherche=20au=20lieu=20de=20rediriger=20vers=20le=201e?= =?UTF-8?q?r?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remplace la redirection 301 vers le premier résultat par une redirection 302 vers /search?q=... pour laisser l'utilisateur choisir parmi les résultats. Co-Authored-By: Claude Sonnet 4.6 --- public/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/index.php b/public/index.php index b5cfadd..1a0bdcf 100644 --- a/public/index.php +++ b/public/index.php @@ -68,7 +68,7 @@ function searchAndRedirect(string $rawPath, ArticleManager $articles): void )); $results = (new SearchEngine())->search($query, $pool); if (!empty($results)) { - header('Location: /post/' . rawurlencode($results[0]['article']['slug'] ?? ''), true, 301); + header('Location: /search?q=' . urlencode($query), true, 302); exit; } }