This commit is contained in:
François Poulain 2018-07-06 09:49:21 +02:00 committed by root
parent b0caf41b06
commit b5bd31e17c

View File

@ -55,12 +55,12 @@ $server_names= array('expolibre.org', 'www.expolibre.org', 'libreexpo.org', 'www
if (!isset ($_SERVER['HTTP_REFERER']) or ( if (!isset ($_SERVER['HTTP_REFERER']) or (
strrpos ($_SERVER['HTTP_REFERER'], 'expolibre.org') === false and strrpos ($_SERVER['HTTP_REFERER'], 'expolibre.org') === false and
strrpos ($_SERVER['HTTP_REFERER'], 'libreexpo.org') === false)) { strrpos ($_SERVER['HTTP_REFERER'], 'libreexpo.org') === false)) {
if ($current_dir == "htdocs") if ($current_dir == "htdocs") {
$current_dir= $registered_languages['fr']['loc']; $current_dir= $registered_languages['fr']['loc'];
$prefered_dir= $registered_languages[prefered_language ()]['loc']; $prefered_dir= $registered_languages[prefered_language ()]['loc'];
if (basename($current_dir) != basename ($prefered_dir)) { if (basename($current_dir) != basename ($prefered_dir)) {
header ("Location: " . url_translate ($_SERVER['REQUEST_URI'], prefered_language ())); header ("Location: " . url_translate ($_SERVER['REQUEST_URI'], prefered_language ()));
exit (); }
} }
} }