diff --git a/includes/common.inc b/includes/common.inc index 4a63391147a..16309da5b92 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -3,7 +3,7 @@ function conf_init() { global $HTTP_HOST, $REQUEST_URI; $file = strtolower(strtr($HTTP_HOST ."". substr($REQUEST_URI, 0, strrpos($REQUEST_URI, "/")), "/:", "..")); - while ($file && !file_exists("includes/$file.php")) $file = substr($file, 0, strrpos($file, ".")); + while ($file && !file_exists("includes/$file.php")) $file = substr($file, strpos($file, ".") + 1); return $file ? $file : "conf"; }