Index: wp-includes/default-filters.php
===================================================================
--- wp-includes/default-filters.php	(revision 5063)
+++ wp-includes/default-filters.php	(working copy)
@@ -145,6 +145,8 @@
 // Misc filters
 add_filter('option_ping_sites', 'privacy_ping_filter');
 add_filter('option_blog_charset', 'wp_specialchars');
+add_filter('option_home', '_config_wp_home');
+add_filter('option_siteurl', '_config_wp_siteurl');
 add_filter('mce_plugins', '_mce_load_rtl_plugin');
 add_filter('mce_buttons', '_mce_add_direction_buttons');
 
Index: wp-includes/functions.php
===================================================================
--- wp-includes/functions.php	(revision 5063)
+++ wp-includes/functions.php	(working copy)
@@ -1351,6 +1351,18 @@
 	die();
 }
 
+function _config_wp_home($url = '') {
+	if ( defined( 'WP_HOME' ) ) 
+		return WP_HOME;
+	else return $url;
+}
+
+function _config_wp_siteurl($url = '') {
+	if ( defined( 'WP_SITEURL' ) ) 
+		return WP_SITEURL;
+	else return $url;
+}
+
 function _mce_set_direction() {
 	global $wp_locale;
 
Index: wp-admin/options-general.php
===================================================================
--- wp-admin/options-general.php	(revision 5063)
+++ wp-admin/options-general.php	(working copy)
@@ -25,11 +25,11 @@
 </tr> 
 <tr valign="top"> 
 <th scope="row"><?php _e('WordPress address (URL):') ?></th> 
-<td><input name="siteurl" type="text" id="siteurl" value="<?php form_option('siteurl'); ?>" size="40" class="code" /></td> 
+<td><input name="siteurl" type="text" id="siteurl" value="<?php form_option('siteurl'); ?>" size="40" class="code<?php if ( defined( 'WP_SITEURL' ) ) : ?> disabled" disabled="disabled"<?php else: ?>"<?php endif; ?> /></td> 
 </tr> 
 <tr valign="top">
 <th scope="row"><?php _e('Blog address (URL):') ?></th>
-<td><input name="home" type="text" id="home" value="<?php form_option('home'); ?>" size="40" class="code" /><br /><?php _e('If you want your blog homepage <a href="http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory">to be different than the directory</a> you installed WordPress in, enter that address here.'); ?></td>
+<td><input name="home" type="text" id="home" value="<?php form_option('home'); ?>" size="40" class="code<?php if ( defined( 'WP_HOME' ) ) : ?> disabled" disabled="disabled"<?php else: ?>"<?php endif; ?> /><br /><?php _e('If you want your blog homepage <a href="http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory">to be different than the directory</a> you installed WordPress in, enter that address here.'); ?></td>
 </tr>
 <tr valign="top"> 
 <th scope="row"><?php _e('E-mail address:') ?> </th> 
