From: Michael Tremer Date: Thu, 15 Jan 2009 18:57:15 +0000 (+0100) Subject: Redirect http://people.ipfire.org/. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8117d35bbc998453dfa511f90845f942ad38970c;p=ipfire.org.git Redirect http://people.ipfire.org/. --- diff --git a/people/index.py b/people/index.py new file mode 120000 index 00000000..122a725f --- /dev/null +++ b/people/index.py @@ -0,0 +1 @@ +../www/index.py \ No newline at end of file diff --git a/www/index.py b/www/index.py index 87044ed9..2e299052 100755 --- a/www/index.py +++ b/www/index.py @@ -4,14 +4,6 @@ import os import re import cgi -sites = ( - ("ipfire.org", ("www.ipfire.org", None)), - ("www.ipfire.org", (None, cgi.FieldStorage().getfirst("file") or "index")), - ("source.ipfire.org", ("www.ipfire.org", "source")), - ("tracker.ipfire.org", ("www.ipfire.org", "tracker")), - ("download.ipfire.org", ("www.ipfire.org", "download")), - ) - # Check language... language = "en" try: @@ -20,6 +12,17 @@ try: except KeyError: pass +index = cgi.FieldStorage().getfirst("file") or "index" + +sites = ( + ("ipfire.org", ("www.ipfire.org", None)), + ("www.ipfire.org", (None, index + "/%s" % language)), + ("source.ipfire.org", ("www.ipfire.org", "source/" + language)), + ("tracker.ipfire.org", ("www.ipfire.org", "tracker/" + language)), + ("download.ipfire.org", ("www.ipfire.org", "download/" + language)), + ("people.ipfire.org", ("wiki.ipfire.org", language + "/people/start")), + ) + print "Status: 302 Moved" print "Pragma: no-cache" @@ -30,7 +33,7 @@ for (servername, destination) in sites: if destination[0]: location = "http://%s" % destination[0] if destination[1]: - location += "/%s/%s" % (destination[1], language,) + location += "/%s" % destination[1] break print "Location: %s" % location