Legend:
- Unmodified
- Added
- Removed
-
index.php
r288 r357 5 5 $de = strpos($_SERVER['HTTP_ACCEPT_LANGUAGE'], 'de'); 6 6 $en = strpos($_SERVER['HTTP_ACCEPT_LANGUAGE'], 'en'); 7 7 8 // Support web prefixes, aka installation of the homepage in 9 // subdirectorys and not in virtual hosts 10 // Basically relative redirects would do the trick, too, 11 // but officially they are not allowed (not standard compilant) 12 include "lib/host.php"; 13 $host = t29Host::detect(); 14 // this is not implemented in the HTML below, since actually 15 // there is no browser who see's that HTML. 16 8 17 if( ($en !== false && $de !== false && $de < $en) || 9 18 ($en === false && de !== false) ) 10 header("Location: /de/");19 header("Location: {$host->web_prefix}/de/"); 11 20 else 12 header("Location: /en/");21 header("Location: {$host->web_prefix}/en/"); 13 22 ?> 14 23 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
Note: See TracChangeset
for help on using the changeset viewer.