Index: wp-admin/network.php
===================================================================
--- wp-admin/network.php	(revision 15769)
+++ wp-admin/network.php	(working copy)
@@ -26,6 +26,46 @@
 	$wpdb->$table = $prefixed_table;
 
 /**
+ * @param bool $subdomain_install configuration
+ * @return string;
+ */
+function network_admin_generate_htaccess_file_content( $subdomain_install ) {
+
+	$uploaded_files = sprintf(
+		'^%sfiles/(.+) wp-includes/ms-files.php?file=$%d',
+		$subdomain_install ? '' : '([_0-9a-zA-Z-]+/)?', 
+		$subdomain_install ? 1 : 2
+	);
+	
+	// $htaccess_comment_if_not_a_subdomain_install
+	$comment_if_not = $subdomain_install ? '' : '# ';
+	
+	$content = '
+RewriteEngine On
+RewriteBase ' . $base . '
+RewriteRule ^index\.php$ - [L]
+
+# uploaded files
+RewriteRule ' . $uploaded_files . ' [L]
+
+# add a trailing slash to /wp-admin (commented if not a subdomain install)
+' . $comment_if_not . 'RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
+
+RewriteCond %{REQUEST_FILENAME} -f [OR]
+RewriteCond %{REQUEST_FILENAME} -d
+RewriteRule ^ - [L]
+
+# serach for non-existant files (commented if not a subdomain install)
+' . $comment_if_not . 'RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
+' . $comment_if_not . 'RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
+
+RewriteRule . index.php [L]
+';
+	
+	return $content;
+}
+	
+/**
  * Check for an existing network.
  *
  * @since 3.0.0
@@ -455,30 +495,11 @@
 
 	<?php else : // end iis7_supports_permalinks(). construct an htaccess file instead:
 
-		$htaccess_file = 'RewriteEngine On
-RewriteBase ' . $base . '
-RewriteRule ^index\.php$ - [L]
-
-# uploaded files
-RewriteRule ^' . ( $subdomain_install ? '' : '([_0-9a-zA-Z-]+/)?' ) . 'files/(.+) wp-includes/ms-files.php?file=$' . ( $subdomain_install ? 1 : 2 ) . ' [L]' . "\n";
-
-		if ( ! $subdomain_install )
-			$htaccess_file .= "\n# add a trailing slash to /wp-admin\n" . 'RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]' . "\n";
-
-		$htaccess_file .= "\n" . 'RewriteCond %{REQUEST_FILENAME} -f [OR]
-RewriteCond %{REQUEST_FILENAME} -d
-RewriteRule ^ - [L]';
-
-		// @todo custom content dir.
-		if ( ! $subdomain_install )
-			$htaccess_file .= "\nRewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]\nRewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]";
-
-		$htaccess_file .= "\nRewriteRule . index.php [L]";
-
+		$file_content = network_admin_generate_htaccess_file_content( $subdomain_install );
 		?>
 		<li><p><?php printf( __( 'Add the following to your <code>.htaccess</code> file in <code>%s</code>, replacing other WordPress rules:' ), ABSPATH ); ?></p>
 		<textarea class="code" readonly="readonly" cols="100" rows="<?php echo $subdomain_install ? 11 : 16; ?>">
-<?php echo wp_htmledit_pre( $htaccess_file ); ?></textarea></li>
+<?php echo wp_htmledit_pre( $file_contet ); ?></textarea></li>
 		</ol>
 
 	<?php endif; // end IIS/Apache code branches.
