]>
git.ipfire.org Git - ipfire.org.git/blob - www/index.py
10 if re
.search(re
.compile("^de(.*)"), os
.environ
["HTTP_ACCEPT_LANGUAGE"]):
15 index
= cgi
.FieldStorage().getfirst("file") or "index"
18 ("ipfire.org", ("www.ipfire.org", None)),
19 ("www.ipfire.org", (None, index
+ "/%s" % language
)),
20 ("source.ipfire.org", ("www.ipfire.org", "source/" + language
)),
21 ("tracker.ipfire.org", ("www.ipfire.org", "tracker/" + language
)),
22 ("download.ipfire.org", ("www.ipfire.org", "download/" + language
)),
23 ("people.ipfire.org", ("wiki.ipfire.org", language
+ "/people/start")),
26 print "Status: 302 Moved"
27 print "Pragma: no-cache"
31 for (servername
, destination
) in sites
:
32 if servername
== os
.environ
["SERVER_NAME"]:
34 location
= "http://%s" % destination
[0]
36 location
+= "/%s" % destination
[1]
39 print "Location: %s" % location
40 print # End the header