aboutsummaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorRomain d'Alverny <rda@mageia.org>2010-11-30 09:17:19 +0000
committerRomain d'Alverny <rda@mageia.org>2010-11-30 09:17:19 +0000
commitcbb8f44b0fba85d7136f9833623d98ad65a87fb7 (patch)
treea8f2cbb2da2625543f3cba8363e3f40a31f36ed9 /index.php
parent2a4cac02881169b2f3d1291a266d61f2cb149397 (diff)
downloadwww-cbb8f44b0fba85d7136f9833623d98ad65a87fb7.tar
www-cbb8f44b0fba85d7136f9833623d98ad65a87fb7.tar.gz
www-cbb8f44b0fba85d7136f9833623d98ad65a87fb7.tar.bz2
www-cbb8f44b0fba85d7136f9833623d98ad65a87fb7.tar.xz
www-cbb8f44b0fba85d7136f9833623d98ad65a87fb7.zip
fix redirection for ll-ll locales
Diffstat (limited to 'index.php')
-rw-r--r--index.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/index.php b/index.php
index 9293c754f..28a39ede5 100644
--- a/index.php
+++ b/index.php
@@ -9,7 +9,11 @@ if (isset($_GET['flang']))
$lang = array_key_exists($_GET['flang'], $langs) ? $_GET['flang'] : 'en';
if (isset($_GET['furl']))
{
- $url = substr_replace($_GET['furl'], $lang, 1, 2);
+ $url = explode('/', $_GET['furl']);
+ array_shift($url);
+ array_shift($url);
+ $url = '/' . $lang . '/' . implode($url, '/');
+ //$url = substr_replace($_GET['furl'], $lang, 1, 2);
}
else
$url = '/' . $lang . '/';