fix podcast redirection
[noxon-gateway.git] / src / header.php
index 8122384dcbe6bfa5db56c62a789c2f3056fdb534..785ada50b3241f672829de9be5f5fec553f4eeb0 100644 (file)
@@ -1,11 +1,9 @@
 <?php
 set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__ . '/../src/');
-$fullUri = $_SERVER['REQUEST_URI'];
-if (isset($_SERVER['REDIRECT_URL'])) {
-    $path    = $_SERVER['REDIRECT_URL'];
-} else {
-    $path = '/';
-}
+
+$requestUriNoQuery = explode('?', $_SERVER['REQUEST_URI'])[0];
+$path = $fullUri = urldecode($requestUriNoQuery);
+
 $dataDir = __DIR__ . '/../data/';
 $varDir  = realpath(__DIR__ . '/../var') . '/';
 $cacheDir = __DIR__ . '/../www/cache/';