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

#35725: Make work like

parent 463ffe24
......@@ -162,9 +162,11 @@ INSTALLATION
If you are installing on a non-standard port number, the ':' is
replaced by a '.'. For example,
could be loaded from sites/
If you are installing on a non-standard port, the port number is
treated as the deepest subdomain. For example:
could be loaded from sites/ The port number
will be removed according to the pattern above if no port-specific
configuration is found, just like a real subdomain.
Each site configuration can have its own site-specific modules and
themes that will be made available in addition to those installed
......@@ -115,7 +115,7 @@ function conf_init() {
$confdir = 'sites';
$uri = explode('/', $_SERVER['PHP_SELF']);
$server = explode('.', str_replace(':', '.', rtrim($_SERVER['HTTP_HOST'], '.')));
$server = explode('.', implode('.', array_reverse(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