summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2017-11-05 05:21:53 +0000
committerLuke Shumaker <lukeshu@sbcglobal.net>2017-11-05 05:21:53 +0000
commit1aa023a199bf29aded7ed9c067102cc906a4b7ac (patch)
treea1b55215959f6033b386778fe98d037480b1b6c1
parente78a01e9cb86f665d4986c05d8d06e4657015fe8 (diff)
mirror: append "?noredirect" to tier 0 URLs
https://lists.parabola.nu/pipermail/dev/2016-July/004242.html
-rw-r--r--mirror.php6
1 files changed, 5 insertions, 1 deletions
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);
}