0337d704 |
1 | <?php |
2 | preg_match("/^\/(moderate|admin|members)\/(.*)_([^_]*)$/", $_SERVER["REQUEST_URI"], $matches); |
3 | if (empty($matches)) { |
4 | exit(); |
5 | } else { |
6 | $action = $matches[1]; |
7 | $mbox = $matches[2]; |
8 | $fqdn = strtolower($matches[3]); |
9 | if ($fqdn == 'polytechnique.org') { |
bc4ad6aa |
10 | header("Location: https://www.polytechnique.org/lists/$action/$mbox"); |
0337d704 |
11 | } else { |
12 | require("../include/xorg.inc.php"); |
13 | $res = $globals->xdb->query("select diminutif from groupex.asso where mail_domain = {?}", $fqdn); |
14 | if ($gpx = $res->fetchOneCell()) { |
bc4ad6aa |
15 | header("Location: http://www.polytechnique.net/$gpx/lists/$action/$mbox"); |
0337d704 |
16 | } |
17 | } |
18 | } |
19 | ?> |