aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--constants.inc.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/constants.inc.php b/constants.inc.php
index 681a141..c198165 100644
--- a/constants.inc.php
+++ b/constants.inc.php
@@ -47,10 +47,14 @@ define('PAGE_WATCHLIST', "watchlist");
// INSTALLATION_ID is based on directory DB and used as prefix (in session and cookie) to prevent mutual login for different installations on the same host server
define('INSTALLATION_ID', md5($GLOBALS['dbname'].$GLOBALS['tableprefix']));
-
-// Correct bug with PATH_INFO (maybe for Apache 1)
+// Correct bugs with PATH_INFO (maybe for Apache 1 or CGI) -- for 1&1 host...
if(strlen($_SERVER["PATH_INFO"])<strlen($_SERVER["ORIG_PATH_INFO"])) {
$_SERVER["PATH_INFO"] = $_SERVER["ORIG_PATH_INFO"];
}
-
+if(strcasecmp($_SERVER["PATH_INFO"], $_SERVER["SCRIPT_NAME "]) == 0) {
+ unset($_SERVER["PATH_INFO"]);
+}
+if(strpos($_SERVER["PATH_INFO"], '.php') !== false) {
+ unset($_SERVER["PATH_INFO"]);
+}
?>