From 1aa023a199bf29aded7ed9c067102cc906a4b7ac Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 5 Nov 2017 05:21:53 +0000 Subject: mirror: append "?noredirect" to tier 0 URLs https://lists.parabola.nu/pipermail/dev/2016-July/004242.html --- mirror.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mirror.php b/mirror.php index 8a61747..206b081 100644 --- a/mirror.php +++ b/mirror.php @@ -62,5 +62,9 @@ if (!file_exists($root.'/'.$filename)) { $mirror = $mirrors[array_rand($mirrors)]; } } - header('Location: '.$mirror.$filename); + $location = $mirror.$filename; + if ($mirror === $tier0_url) { + $location .= "?noredirect"; + } + header('Location: '.$location); } -- cgit v1.2.2