aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--index.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/index.php b/index.php
index 4fd47cace..2d86636d6 100644
--- a/index.php
+++ b/index.php
@@ -5,6 +5,18 @@
require_once 'langs.inc.php';
+// NOTE, this should go to the main controller in the next platform
+// (catching all requests)
+$domain = 'mageia.org';
+$www_domain = 'www.' . $domain;
+if (G_VHOST == $domain) {
+ header ('HTTP/1.1 301 Moved Permanently');
+ header(sprintf('Location: http://%s%s', $www_domain, $_SERVER['REQUEST_URI']));
+ die;
+} elseif (G_VHOST != $www_domain) {
+ domain_redirect($_SERVER['SERVER_NAME'], $domains_lang, $www_domain);
+}
+
if (isset($_GET['langs'])) { die(show_langs($langs)); }
if (isset($_GET['flang']))