aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfilip <filip.komar@gmail.com>2016-06-13 01:25:30 +0200
committerfilip <filip.komar@gmail.com>2016-06-13 01:25:30 +0200
commit2ee497f233166212ea31439c64272b22fc0d2f4e (patch)
treedf16fef4b450fa8d34f853143653fb37de7f9369
parent89de05fad0c205ad0d5d8475cbb9fd94a9bb5f83 (diff)
downloadwww-2ee497f233166212ea31439c64272b22fc0d2f4e.tar
www-2ee497f233166212ea31439c64272b22fc0d2f4e.tar.gz
www-2ee497f233166212ea31439c64272b22fc0d2f4e.tar.bz2
www-2ee497f233166212ea31439c64272b22fc0d2f4e.tar.xz
www-2ee497f233166212ea31439c64272b22fc0d2f4e.zip
ligher server load with redirection
adding some 'die' instructions after header('Location: ...
-rw-r--r--en/alpha/index.php3
-rw-r--r--en/downloads/2/index.php1
-rw-r--r--en/downloads/3/index.php3
-rw-r--r--en/downloads/4/index.php1
-rw-r--r--en/downloads/5/index.php1
-rw-r--r--en/downloads/6/index.php1
-rw-r--r--en/downloads/dl.php2
-rw-r--r--index.php1
-rw-r--r--langs.inc.php1
9 files changed, 11 insertions, 3 deletions
diff --git a/en/alpha/index.php b/en/alpha/index.php
index 6ebcc223f..3470943c0 100644
--- a/en/alpha/index.php
+++ b/en/alpha/index.php
@@ -1 +1,2 @@
-<?php header('Location: /downloads/'); \ No newline at end of file
+<?php header('Location: /downloads/');
+die;
diff --git a/en/downloads/2/index.php b/en/downloads/2/index.php
index 7f6cdbb6c..5f0af6863 100644
--- a/en/downloads/2/index.php
+++ b/en/downloads/2/index.php
@@ -1,2 +1,3 @@
<?php
header('Location: /2/');
+die;
diff --git a/en/downloads/3/index.php b/en/downloads/3/index.php
index 0ff17cb97..91b4bfb8e 100644
--- a/en/downloads/3/index.php
+++ b/en/downloads/3/index.php
@@ -1,2 +1,3 @@
<?php
-header('Location: /3/'); \ No newline at end of file
+header('Location: /3/');
+die;
diff --git a/en/downloads/4/index.php b/en/downloads/4/index.php
index f03766845..efd0cd3fc 100644
--- a/en/downloads/4/index.php
+++ b/en/downloads/4/index.php
@@ -1,2 +1,3 @@
<?php
header('Location: /4/');
+die;
diff --git a/en/downloads/5/index.php b/en/downloads/5/index.php
index 4ce13c7a4..bc9d3b62d 100644
--- a/en/downloads/5/index.php
+++ b/en/downloads/5/index.php
@@ -1,2 +1,3 @@
<?php
header('Location: /5/');
+die;
diff --git a/en/downloads/6/index.php b/en/downloads/6/index.php
index d578b219c..2943e6d53 100644
--- a/en/downloads/6/index.php
+++ b/en/downloads/6/index.php
@@ -1,2 +1,3 @@
<?php
header('Location: /6/');
+die;
diff --git a/en/downloads/dl.php b/en/downloads/dl.php
index 5f058fd9d..18d47208b 100644
--- a/en/downloads/dl.php
+++ b/en/downloads/dl.php
@@ -1,4 +1,4 @@
<?php
header('HTTP/1.1 301 Moved Permanently');
header('Location: /downloads/');
-?> \ No newline at end of file
+die;
diff --git a/index.php b/index.php
index 63c4c5f7e..ba5af2ea2 100644
--- a/index.php
+++ b/index.php
@@ -23,6 +23,7 @@ elseif (isset($_GET['fromtld'])) {
elseif (isset($_SERVER['APP_MODE']) && $_SERVER['APP_MODE'] !== 'prod') {
// don't change domain in developer mode
header(sprintf('Location: //%s%s', $_SERVER['SERVER_NAME'], $_SERVER['REQUEST_URI']));
+ die;
}
elseif (G_VHOST != $www_domain) {
// rewrite "//mageia.it/" to "//www.mageia.org/it/"
diff --git a/langs.inc.php b/langs.inc.php
index 5c18dd2dc..42bb3a748 100644
--- a/langs.inc.php
+++ b/langs.inc.php
@@ -90,6 +90,7 @@ function relocate($langs, $page = '', $default_locale = 'en', $force_accept_lang
if ('cli' != PHP_SAPI && $do_redirect) {
header('Location: ' . $relocate);
+ die;
}
return $relocate;