Index: includes/bootstrap.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v
retrieving revision 1.258
diff -u -p -r1.258 bootstrap.inc
--- includes/bootstrap.inc	20 Dec 2008 18:24:32 -0000	1.258
+++ includes/bootstrap.inc	22 Dec 2008 12:08:40 -0000
@@ -844,7 +844,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 {
