Index: install.php
===================================================================
RCS file: /cvs/drupal/drupal/install.php,v
retrieving revision 1.95
diff -u -r1.95 install.php
--- install.php	20 Nov 2007 13:24:53 -0000	1.95
+++ install.php	22 Nov 2007 19:27:38 -0000
@@ -683,6 +683,8 @@
       // Add JavaScript validation.
       _user_password_dynamic_validation();
       drupal_add_js(drupal_get_path('module', 'system') .'/system.js', 'module');
+      drupal_add_base_path_to_js();
+      
       // We add these strings as settings because JavaScript translation does not
       // work on install time.
       drupal_add_js(array('copyFieldValue' => array('edit-site-mail' => array('edit-account-mail')), 'cleanURL' => array('success' => st('Your server has been successfully tested to support this feature.'), 'failure' => st('Your system configuration does not currently support this feature. The <a href="http://drupal.org/node/15365">handbook page on Clean URLs</a> has additional troubleshooting information.'), 'testing' => st('Testing clean URLs...'))), 'setting');
Index: modules/system/system.js
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.js,v
retrieving revision 1.13
diff -u -r1.13 system.js
--- modules/system/system.js	27 Oct 2007 11:32:05 -0000	1.13
+++ modules/system/system.js	22 Nov 2007 19:27:42 -0000
@@ -42,7 +42,7 @@
  * are currently enabled.
  */
 Drupal.cleanURLsInstallCheck = function() {
-  var url = location.protocol +"//"+ location.host + location.pathname.replace(/\/[^\/]*$/, "/") +"admin/settings/clean-urls/check";
+  var url = location.protocol +"//"+ location.host + Drupal.settings.base_path +"admin/settings/clean-urls/check";
   $("#clean-url .description").append('<span><div id="testing">'+ Drupal.settings.cleanURL.testing +"</div></span>");
   $("#clean-url.install").css("display", "block");
   $.ajax({
Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.719
diff -u -r1.719 common.inc
--- includes/common.inc	21 Nov 2007 22:53:40 -0000	1.719
+++ includes/common.inc	22 Nov 2007 19:27:42 -0000
@@ -2052,6 +2052,22 @@
 }
 
 /**
+ * Provide base_path to JavaScript.  
+ * The base path of a site is needed in dynamic requests to the server 
+ * (AJAX/AHAH), to build the URL to Drupal paths.
+ */
+function drupal_add_base_path_to_js() {
+  static $base_path_added = FALSE;
+  if (!$base_path_added) {
+    $settings = array(
+      'base_path' => base_path(),
+    );
+    drupal_add_js($settings, 'setting');
+    $base_path_added = TRUE;
+  }
+}
+
+/**
  * Aggregate JS files, putting them in the files directory.
  *
  * @param $files
