Bug #118
closed
Website link to DDL Debian repository is dead for all languages but French
Added by Jean-Michel Philippe almost 14 years ago.
Updated almost 14 years ago.
Description
The Debian repository link refers to a missing Html page: index.ru.html
. Russian is certainly not the only one. It would be better to use a Php script with a variable for the language:
index.php?lang=ru
The only real good solution is to write a redirection script similarly to the download.doudoulinux.org link. We would then need to write a Debian repository page in Spip.
As a workaround we can temporarily write a small Php script that tests existence of the Html page before redirecting, with fall-back to English as usual…
Files
- Assignee deleted (
Jean-Michel Philippe)
if (!isset($Langue)) { $Langue = explode(",",strtolower($_SERVER["HTTP_ACCEPT_LANGUAGE"]));
$Langue = substr($Langue[0],0,2);}
else {$Langue = "en";}
$TargetFile = "index.".$Langue.".html";
if (file_exists($TargetFile)) { header("Location: ".$TargetFile); }
else { header("Location: index.en.html"); }
OR
if (!isset($Langue)) { $Langue = explode(",",strtolower($_SERVER["HTTP_ACCEPT_LANGUAGE"]));
$Langue = substr($Langue[0],0,2);}
else {$Langue = "en";}
$TargetFile = "index.php?lang=".$Langue;
if (file_exists($TargetFile)) { header("Location: ".$TargetFile); }
else { header("Location: index.php?lang=en"); }
View files for comment.
- Assignee deleted (
Xavier Brusselaers)
- Status changed from In Progress to Closed
- % Done changed from 50 to 100
I figured out that the Spip skeleton was not correct: leading to Html pages directly instead of Php. Now everything is working :). We now need a new ticket to port the download page principle to this page.
Also available in: Atom
PDF