aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--downloads/get/index.php4
-rw-r--r--langs.inc.php4
2 files changed, 6 insertions, 2 deletions
diff --git a/downloads/get/index.php b/downloads/get/index.php
new file mode 100644
index 000000000..b48e56cc0
--- /dev/null
+++ b/downloads/get/index.php
@@ -0,0 +1,4 @@
+<?php
+
+require_once '../langs.inc.php';
+relocate($langs, $_SERVER['REQUEST_URI']); \ No newline at end of file
diff --git a/langs.inc.php b/langs.inc.php
index cb0704cb3..49f326f9d 100644
--- a/langs.inc.php
+++ b/langs.inc.php
@@ -101,10 +101,10 @@ function relocate($langs, $page = '', $default_locale = 'en')
$locale->setDefaultLocale($default_locale);
- header(sprintf('Location: /%s/%s',
+ header(str_replace('//', '/', sprintf('Location: /%s/%s',
$locale->getCompatibleLocale(),
$page
- ));
+ )));
die;
}