]> git.ipfire.org Git - ipfire.org.git/commitdiff
German users are redirected to the german site.
authorms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Sun, 28 Oct 2007 20:34:13 +0000 (20:34 +0000)
committerms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Sun, 28 Oct 2007 20:34:13 +0000 (20:34 +0000)
The others will be redirected to the english one.

git-svn-id: http://svn.ipfire.org/svn/ipfire/branches/www.ipfire.org/trunk@1024 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

header.shtml
index.pl

index 989e55eebaedfb78319643cb3017a7734582f228..9a1892fff93f13334367d92d89e2ee86b1350e09 100644 (file)
@@ -26,7 +26,9 @@
                
                <div id="menu">
                        <ul>
-                               <!--#if expr="$SERVER_NAME != source.ipfire.org" -->
+                               <!--#if expr="$SERVER_NAME = source.ipfire.org" -->
+                               <li><a href="source.shtml">Source</a></li>
+                               <!--#else -->
                                <li><a href="index.shtml">Home</a></li>
                                <li><a href="downloads.shtml">Downloads</a></li>
                                <li><a href="http://wiki.ipfire.org/">Wiki</a></li>
index dd630fcae6b574740a080a7359a438e55acb7dbb..2ed28962a89e2882a83dd29f47a4af108dce1fbb 100755 (executable)
--- a/index.pl
+++ b/index.pl
@@ -1,12 +1,19 @@
 #!/usr/bin/perl
 
+my $lang = "en";
+
+# Set language to german, else use english site
+if ($ENV{'HTTP_ACCEPT_LANGUAGE'} =~ /^de(.*)/) {
+       $lang = "de";
+}
+
 print "Status: 302 Moved\n";
 print "Pragma: no-cache\n";
 
 if ($ENV{'SERVER_NAME'} eq "source.ipfire.org") {
-       print "Location: /en/source.shtml\n";
+       print "Location: /$lang/source.shtml\n";
 } else {
-       print "Location: /en/index.shtml\n";
+       print "Location: /$lang/index.shtml\n";
 }
 
 # End http header...