Index: wp-admin/network/site-new.php
===================================================================
--- wp-admin/network/site-new.php	(Revision 34185)
+++ wp-admin/network/site-new.php	(Arbeitskopie)
@@ -40,18 +40,22 @@
 		wp_die( __( 'Can&#8217;t create an empty site.' ) );
 
 	$blog = $_POST['blog'];
-	$domain = '';
-	if ( preg_match( '|^([a-zA-Z0-9-])+$|', $blog['domain'] ) )
-		$domain = strtolower( $blog['domain'] );
+	$parsed_url = parse_url( 'http://' . trim( $blog['url'] ) );
+	
+	if ( empty( $parsed_url ) )
+		wp_die( __( 'Missing or invalid site address.' ) );
+	
+	$newdomain = strtolower( $parsed_url['domain'] );
+	$path = trailingslashit( $parsed_url['path'] );
 
-	// If not a subdomain install, make sure the domain isn't a reserved word
-	if ( ! is_subdomain_install() ) {
-		/** This filter is documented in wp-includes/ms-functions.php */
-		$subdirectory_reserved_names = apply_filters( 'subdirectory_reserved_names', array( 'page', 'comments', 'blog', 'files', 'feed', 'wp-admin', 'wp-content', 'wp-includes' ) );
-		if ( in_array( $domain, $subdirectory_reserved_names ) )
+	// Make sure the path isn't a reserved word
+	/** This filter is documented in wp-includes/ms-functions.php */
+	$subdirectory_reserved_names = apply_filters( 'subdirectory_reserved_names', array( 'page', 'comments', 'blog', 'files', 'feed', 'wp-admin', 'wp-content', 'wp-includes' ) );
+	foreach( $subdirectory_reserved_names as $reserved_name ) {
+		if ( strpos( $path, '/' . $reserved_name . '/' ) !== false ) 
 			wp_die( sprintf( __('The following words are reserved for use by WordPress functions and cannot be used as blog names: <code>%s</code>' ), implode( '</code>, <code>', $subdirectory_reserved_names ) ) );
 	}
-
+	
 	$title = $blog['title'];
 
 	$meta = array(
@@ -66,9 +70,6 @@
 		}
 	}
 
-	if ( empty( $domain ) )
-		wp_die( __( 'Missing or invalid site address.' ) );
-
 	if ( isset( $blog['email'] ) && '' === trim( $blog['email'] ) ) {
 		wp_die( __( 'Missing email address.' ) );
 	}
@@ -78,19 +79,18 @@
 		wp_die( __( 'Invalid email address.' ) );
 	}
 
-	if ( is_subdomain_install() ) {
-		$newdomain = $domain . '.' . preg_replace( '|^www\.|', '', $current_site->domain );
-		$path      = $current_site->path;
-	} else {
-		$newdomain = $current_site->domain;
-		$path      = $current_site->path . $domain . '/';
-	}
-
 	$password = 'N/A';
 	$user_id = email_exists($email);
 	if ( !$user_id ) { // Create a new user with a random password
+		if ( is_subdomain_install() ) {
+			$subdomain = explode( $newdomain, '.', 1 );
+			$username = $subdomain[0];
+		} else {
+			$pathsegments = explode( trim( $path, '/' ), '/' );
+			$username = array_pop( $pathsegments );
+		}		
 		$password = wp_generate_password( 12, false );
-		$user_id = wpmu_create_user( $domain, $password, $email );
+		$user_id = wpmu_create_user( $username, $password, $email );
 		if ( false === $user_id )
 			wp_die( __( 'There was an error creating the user.' ) );
 		else
@@ -156,14 +156,8 @@
 	<table class="form-table">
 		<tr class="form-field form-required">
 			<th scope="row"><label for="site-address"><?php _e( 'Site Address' ) ?></label></th>
-			<td>
-			<?php if ( is_subdomain_install() ) { ?>
-				<input name="blog[domain]" type="text" class="regular-text" id="site-address" aria-describedby="site-address-desc" autocapitalize="none" autocorrect="off"/><span class="no-break">.<?php echo preg_replace( '|^www\.|', '', $current_site->domain ); ?></span>
-			<?php } else {
-				echo $current_site->domain . $current_site->path ?><input name="blog[domain]" type="text" class="regular-text" id="site-address" aria-describedby="site-address-desc"  autocapitalize="none" autocorrect="off" />
-			<?php }
-			echo '<p id="site-address-desc">' . __( 'Only lowercase letters (a-z) and numbers are allowed.' ) . '</p>';
-			?>
+			<td>http://
+			<input name="blog[url]" type="text" class="regular-text" id="site-address" aria-describedby="site-address-desc" autocapitalize="none" autocorrect="off"/><span class="no-break">.<?php echo $current_site->domain . $current_site->path;  ?></span>
 			</td>
 		</tr>
 		<tr class="form-field form-required">
