aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfilip <filip.komar@gmail.com>2015-07-26 22:53:53 +0200
committerfilip <filip.komar@gmail.com>2015-07-26 22:53:53 +0200
commitf202d607aabf324e6467a3c10f6a71a03b1838c8 (patch)
treef5a4b6953409c5157d96f0cd5ec9f8a379a62b13
parent8f203863b0fb25675797fcdb8fece084ba76847f (diff)
downloadwww-f202d607aabf324e6467a3c10f6a71a03b1838c8.tar
www-f202d607aabf324e6467a3c10f6a71a03b1838c8.tar.gz
www-f202d607aabf324e6467a3c10f6a71a03b1838c8.tar.bz2
www-f202d607aabf324e6467a3c10f6a71a03b1838c8.tar.xz
www-f202d607aabf324e6467a3c10f6a71a03b1838c8.zip
don't change domain in developer mode
-rw-r--r--index.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/index.php b/index.php
index 72f2913c6..63c4c5f7e 100644
--- a/index.php
+++ b/index.php
@@ -20,6 +20,10 @@ elseif (isset($_GET['fromtld'])) {
// rewrite "//mageia.org/?fromtld=it" to "//www.mageia.org/it/"
tld_redirect($_GET['fromtld'], $domains_lang, $www_domain);
}
+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']));
+}
elseif (G_VHOST != $www_domain) {
// rewrite "//mageia.it/" to "//www.mageia.org/it/"
domain_redirect($_SERVER['SERVER_NAME'], $domains_lang, $www_domain);