Commit f60da5b0 authored by Steven Wittens's avatar Steven Wittens
Browse files

- #19130: Handle trailing dot in hostname when scanning for config.

parent 0805a476
......@@ -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));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment