Bug #118
closedWebsite link to DDL Debian repository is dead for all languages but French
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
Updated by Jean-Michel Philippe over 13 years ago
- Assignee deleted (
Jean-Michel Philippe)
Updated by Xavier Brusselaers over 13 years ago
- File index.new.withcomment.php index.new.withcomment.php added
- Status changed from New to In Progress
- Assignee set to Xavier Brusselaers
- % Done changed from 0 to 50
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.
Updated by Xavier Brusselaers over 13 years ago
- Assignee deleted (
Xavier Brusselaers)
Updated by Jean-Michel Philippe over 13 years ago
- 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.