Index: includes/bootstrap.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v
retrieving revision 1.206.2.7
diff -u -r1.206.2.7 bootstrap.inc
--- includes/bootstrap.inc	8 Dec 2008 11:49:48 -0000	1.206.2.7
+++ includes/bootstrap.inc	18 Dec 2008 23:25:00 -0000
@@ -757,6 +757,14 @@
  */
 function request_uri() {
 
+  // ISAPI_Rewrite cannot set REQUEST_URI in IIS, but provides the same value
+  // via HTTP_X_REWRITE_URL and allows us to build Apache compatibility in the
+  // following way.
+  // For more information see http://www.helicontech.com/isapi_rewrite/doc/concept.htm.
+  if (isset($_SERVER['HTTP_X_REWRITE_URL'])) {
+    $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_REWRITE_URL'];
+  }
+
   if (isset($_SERVER['REQUEST_URI'])) {
     $uri = $_SERVER['REQUEST_URI'];
   }
