diff --git a/wp-admin/network.php b/wp-admin/network.php index aed7b2a40d..4c9b03b289 100644 --- a/wp-admin/network.php +++ b/wp-admin/network.php @@ -43,7 +43,7 @@ function network_domain_check() { * @return bool Whether subdomain install is allowed */ function allow_subdomain_install() { - $domain = preg_replace( '|https?://[^/]|', '', get_option( 'siteurl' ) ); + $domain = preg_replace( '|https?://([^/]+)|', '$1', get_option( 'siteurl' ) ); if( false !== strpos( $domain, '/' ) || 'localhost' == $domain || preg_match( '|[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|', $domain ) ) return false;