From e4683e1db42d2339fa0efbafebfbb1f667a0f657 Mon Sep 17 00:00:00 2001 From: jollytoad Date: Wed, 14 Jul 2004 07:57:06 +0000 Subject: [PATCH] Fixed redirection when installed in sub dir. --- redirect.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/redirect.php b/redirect.php index 974b598c..dbfdbfb7 100644 --- a/redirect.php +++ b/redirect.php @@ -4,7 +4,8 @@ $url = $misc->getLastTabURL($_REQUEST['section']); if (is_string($url)) { - header("Location: http://{$_SERVER['HTTP_HOST']}/{$url}"); + $dir = substr($_SERVER['REQUEST_URI'], 0, strrpos ($_SERVER['REQUEST_URI'],'/')); + header("Location: http://{$_SERVER['HTTP_HOST']}{$dir}/{$url}"); exit; } -- 2.39.5