Index: includes/bootstrap.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v
retrieving revision 1.206.2.7
diff -u -p -r1.206.2.7 bootstrap.inc
--- includes/bootstrap.inc	8 Dec 2008 11:49:48 -0000	1.206.2.7
+++ includes/bootstrap.inc	22 Dec 2008 12:06:12 -0000
@@ -757,7 +757,14 @@ function drupal_validate_utf8($text) {
  */
 function request_uri() {
 
-  if (isset($_SERVER['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'])) {
+    $uri = $_SERVER['HTTP_X_REWRITE_URL'];
+  }
+  elseif (isset($_SERVER['REQUEST_URI'])) {
     $uri = $_SERVER['REQUEST_URI'];
   }
   else {
