Index: trunk/wp-admin/network.php =================================================================== --- trunk/wp-admin/network.php (revision 13904) +++ trunk/wp-admin/network.php (revision 13926) @@ -37,4 +37,17 @@ } +/** + * Allow subdomain install + * + * @since 3.0.0 + * @return bool - whether subdomain install is allowed + */ +function allow_subdomain_install() { + $path = preg_replace( '|https?://[^/]|', '', get_option( 'siteurl' ) ); + if( strlen( $path ) > 1 || 'localhost' == $_SERVER[ 'HTTP_HOST' ] ) + return false; + + return true; +} /** * Get base domain of network. @@ -135,5 +148,5 @@ } - if ( 'localhost' != $hostname ) : ?> + if ( allow_subdomain_install() ) : ?>
You cannot change this later.' ); ?>
@@ -176,4 +189,9 @@localhost.localdomain
if you wish to use sub-domains.'); ?>