Index: wp-admin/options-permalink.php
===================================================================
--- wp-admin/options-permalink.php	(revision 22339)
+++ wp-admin/options-permalink.php	(working copy)
@@ -82,44 +82,8 @@
 if ( is_multisite() && !is_subdomain_install() && is_main_site() )
 	$blog_prefix = '/blog';
 
-if ( isset($_POST['permalink_structure']) || isset($_POST['category_base']) ) {
-	check_admin_referer('update-permalink');
-
-	if ( isset( $_POST['permalink_structure'] ) ) {
-		if ( isset( $_POST['selection'] ) && 'custom' != $_POST['selection'] )
-			$permalink_structure = $_POST['selection'];
-		else
-			$permalink_structure = $_POST['permalink_structure'];
-
-		if ( ! empty( $permalink_structure ) ) {
-			$permalink_structure = preg_replace( '#/+#', '/', '/' . str_replace( '#', '', $permalink_structure ) );
-			if ( $prefix && $blog_prefix )
-				$permalink_structure = $prefix . preg_replace( '#^/?index\.php#', '', $permalink_structure );
-			else
-				$permalink_structure = $blog_prefix . $permalink_structure;
-		}
-		$wp_rewrite->set_permalink_structure( $permalink_structure );
-	}
-
-	if ( isset( $_POST['category_base'] ) ) {
-		$category_base = $_POST['category_base'];
-		if ( ! empty( $category_base ) )
-			$category_base = $blog_prefix . preg_replace('#/+#', '/', '/' . str_replace( '#', '', $category_base ) );
-		$wp_rewrite->set_category_base( $category_base );
-	}
-
-	if ( isset( $_POST['tag_base'] ) ) {
-		$tag_base = $_POST['tag_base'];
-		if ( ! empty( $tag_base ) )
-			$tag_base = $blog_prefix . preg_replace('#/+#', '/', '/' . str_replace( '#', '', $tag_base ) );
-		$wp_rewrite->set_tag_base( $tag_base );
-	}
-
-	create_initial_taxonomies();
-}
-
-$permalink_structure = get_option('permalink_structure');
-$category_base = get_option('category_base');
+$permalink_structure = get_option( 'permalink_structure' );
+$category_base = get_option( 'category_base' );
 $tag_base = get_option( 'tag_base' );
 
 if ( $iis7_permalinks ) {
@@ -140,36 +104,14 @@
 	$usingpi = false;
 
 flush_rewrite_rules();
-
-if (isset($_POST['submit'])) : ?>
-<div id="message" class="updated"><p><?php
-if ( ! is_multisite() ) {
-	if ( $iis7_permalinks ) {
-		if ( $permalink_structure && ! $usingpi && ! $writable )
-			_e('You should update your web.config now.');
-		else if ( $permalink_structure && ! $usingpi && $writable )
-			_e('Permalink structure updated. Remove write access on web.config file now!');
-		else
-			_e('Permalink structure updated.');
-	} else {
-		if ( $permalink_structure && ! $usingpi && ! $writable )
-			_e('You should update your .htaccess now.');
-		else
-			_e('Permalink structure updated.');
-	}
-} else {
-	_e('Permalink structure updated.');
-}
 ?>
-</p></div>
-<?php endif; ?>
 
 <div class="wrap">
 <?php screen_icon(); ?>
 <h2><?php echo esc_html( $title ); ?></h2>
 
-<form name="form" action="options-permalink.php" method="post">
-<?php wp_nonce_field('update-permalink') ?>
+<form name="form" action="options.php" method="post">
+<?php settings_fields( 'permalink' ); ?>
 
   <p><?php _e('By default WordPress uses web <abbr title="Universal Resource Locator">URL</abbr>s which have question marks and lots of numbers in them, however WordPress offers you the ability to create a custom URL structure for your permalinks and archives. This can improve the aesthetics, usability, and forward-compatibility of your links. A <a href="http://codex.wordpress.org/Using_Permalinks">number of tags are available</a>, and here are some examples to get you started.'); ?></p>
 
Index: wp-admin/options.php
===================================================================
--- wp-admin/options.php	(revision 22339)
+++ wp-admin/options.php	(working copy)
@@ -63,7 +63,8 @@
 	'discussion' => array( 'default_pingback_flag', 'default_ping_status', 'default_comment_status', 'comments_notify', 'moderation_notify', 'comment_moderation', 'require_name_email', 'comment_whitelist', 'comment_max_links', 'moderation_keys', 'blacklist_keys', 'show_avatars', 'avatar_rating', 'avatar_default', 'close_comments_for_old_posts', 'close_comments_days_old', 'thread_comments', 'thread_comments_depth', 'page_comments', 'comments_per_page', 'default_comments_page', 'comment_order', 'comment_registration' ),
 	'media' => array( 'thumbnail_size_w', 'thumbnail_size_h', 'thumbnail_crop', 'medium_size_w', 'medium_size_h', 'large_size_w', 'large_size_h', 'image_default_size', 'image_default_align', 'image_default_link_type' ),
 	'reading' => array( 'posts_per_page', 'posts_per_rss', 'rss_use_excerpt', 'show_on_front', 'blog_public' ),
-	'writing' => array( 'use_smilies', 'default_category', 'default_email_category', 'use_balanceTags', 'default_link_category', 'default_post_format' )
+	'writing' => array( 'use_smilies', 'default_category', 'default_email_category', 'use_balanceTags', 'default_link_category', 'default_post_format' ),
+	'permalink' => array( 'permalink_structure', 'category_base', 'tag_base' ),
 );
 $whitelist_options['misc'] = $whitelist_options['options'] = $whitelist_options['privacy'] = array();
 
@@ -139,6 +140,87 @@
 		}
 	}
 
+	// Handle permalinks page.
+	if ( 'permalink' == $option_page ) {
+
+		$prefix = $blog_prefix = '';
+		if ( ! got_mod_rewrite() && ! iis7_supports_permalinks() )
+			$prefix = '/index.php';
+		if ( is_multisite() && ! is_subdomain_install() && is_main_site() )
+			$blog_prefix = '/blog';
+
+		if ( isset( $_POST['permalink_structure'] ) || isset( $_POST['category_base'] ) || isset( $_POST['tag_base'] ) ) {
+
+			if ( isset( $_POST['permalink_structure'] ) ) {
+				$permalink_structure = $_POST['permalink_structure'];
+
+				if ( isset( $_POST['selection'] ) && 'custom' != $_POST['selection'] ) {
+					$permalink_structure = $_POST['selection'];
+				}
+
+				if ( ! empty( $permalink_structure ) ) {
+					$permalink_structure = preg_replace( '#/+#', '/', '/' . str_replace( '#', '', $permalink_structure ) );
+					if ( $prefix && $blog_prefix )
+						$permalink_structure = $prefix . preg_replace( '#^/?index\.php#', '', $permalink_structure );
+					else
+						$permalink_structure = $blog_prefix . $permalink_structure;
+				}
+
+				$wp_rewrite->set_permalink_structure( $permalink_structure );
+
+				// Make sure the actual option is updated too.
+				$_POST['permalink_structure'] = $permalink_structure;
+			}
+
+			if ( isset( $_POST['category_base'] ) ) {
+				$category_base = $_POST['category_base'];
+				if ( ! empty( $category_base ) )
+					$category_base = $blog_prefix . preg_replace( '#/+#', '/', '/' . str_replace( '#', '', $category_base ) );
+				$wp_rewrite->set_category_base( $category_base );
+			}
+
+			if ( isset( $_POST['tag_base'] ) ) {
+				$tag_base = $_POST['tag_base'];
+				if ( ! empty( $tag_base ) )
+					$tag_base = $blog_prefix . preg_replace('#/+#', '/', '/' . str_replace( '#', '', $tag_base ) );
+				$wp_rewrite->set_tag_base( $tag_base );
+			}
+
+			// Used for a proper update message.
+			if ( iis7_supports_permalinks() ) {
+				if ( ( ! file_exists($home_path . 'web.config') && win_is_writable($home_path) ) || win_is_writable($home_path . 'web.config') )
+					$writable = true;
+				else
+					$writable = false;
+			} else {
+				if ( ( ! file_exists($home_path . '.htaccess') && is_writable($home_path) ) || is_writable($home_path . '.htaccess') )
+					$writable = true;
+				else
+					$writable = false;
+			}
+
+			if ( ! is_multisite() ) {
+				if ( iis7_supports_permalinks() ) {
+					if ( $permalink_structure && ! $wp_rewrite->using_index_permalinks() && ! $writable )
+						add_settings_error( 'permalink', 'settings_updated', __( 'You should update your web.config now.' ), 'updated' );
+					else if ( $permalink_structure && ! $wp_rewrite->using_index_permalinks() && $writable )
+						add_settings_error( 'permalink', 'settings_updated', __( 'Permalink structure updated. Remove write access on web.config file now!' ), 'updated' );
+					else
+						add_settings_error( 'permalink', 'settings_updated', __( 'Permalink structure updated.' ), 'updated' );
+				} else {
+					if ( $permalink_structure && ! $wp_rewrite->using_index_permalinks() && ! $writable )
+						add_settings_error( 'permalink', 'settings_updated', __( 'You should update your .htaccess now.' ), 'updated' );
+					else
+						add_settings_error( 'permalink', 'settings_updated', __( 'Permalink structure updated.' ), 'updated' );
+				}
+			} else {
+				add_settings_error( 'permalink', 'settings_updated', __( 'Permalink structure updated.' ), 'updated' );
+			}
+
+			create_initial_taxonomies();
+		}
+	}
+
 	if ( $options ) {
 		foreach ( $options as $option ) {
 			if ( $unregistered )
