From f60da5b071fe6af217a3eb8e63efac30632656ed Mon Sep 17 00:00:00 2001 From: Steven Wittens Date: Sat, 19 Mar 2005 01:24:18 +0000 Subject: - #19130: Handle trailing dot in hostname when scanning for config. --- includes/bootstrap.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'includes') diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index 911632f20..509779049 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -50,7 +50,7 @@ function conf_init() { $confdir = 'sites'; $uri = explode('/', $_SERVER['PHP_SELF']); - $server = explode('.', $_SERVER['HTTP_HOST']); + $server = explode('.', rtrim($_SERVER['HTTP_HOST'], '.')); for ($i = count($uri) - 1; $i > 0; $i--) { for ($j = count($server); $j > 0; $j--) { $dir = implode('.', array_slice($server, -$j)) . implode('.', array_slice($uri, 0, $i)); -- cgit v1.2.3