From 6f8e1fd915729a0ec19c8589ed447acb0e5b93f5 Mon Sep 17 00:00:00 2001 From: zero Date: Mon, 23 Apr 2007 01:48:05 +0000 Subject: [PATCH] git-svn-id: http://xe-core.googlecode.com/svn/trunk@1268 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- classes/context/Context.class.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index 048acea3b..3c3a3ddee 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -485,8 +485,7 @@ $hostname = $_SERVER['SERVER_NAME']; $port = $_SERVER['SERVER_PORT']; if($port!=80) $hostname .= ":{$port}"; - $path = $_SERVER['REDIRECT_URL']; - $path = $_SERVER['REDIRECT_URL']?$_SERVER['REDIRECT_URL']:preg_replace('/([a-zA-Z0-9\_]+).php/i','',$_SERVER['PHP_SELF']); + $path = str_replace('index.php','',$_SERVER['SCRIPT_NAME']); return sprintf("http://%s%s",$hostname,$path); }