diff options
author | Romain d'Alverny <rda@mageia.org> | 2011-06-29 15:54:46 +0000 |
---|---|---|
committer | Romain d'Alverny <rda@mageia.org> | 2011-06-29 15:54:46 +0000 |
commit | b6db535862a15c3b4473ab3b324878cbfa792283 (patch) | |
tree | 5417aa35c34af24c0b1d44711139dd0e339c753c /index.php | |
parent | 1de178d99e35dba18e7b506ab801149f2a388b2d (diff) | |
download | www-b6db535862a15c3b4473ab3b324878cbfa792283.tar www-b6db535862a15c3b4473ab3b324878cbfa792283.tar.gz www-b6db535862a15c3b4473ab3b324878cbfa792283.tar.bz2 www-b6db535862a15c3b4473ab3b324878cbfa792283.tar.xz www-b6db535862a15c3b4473ab3b324878cbfa792283.zip |
force www.mageia.org on / - redirect known mageia.* hosts to www.mageia.org
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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'])) |