Index: includes/bootstrap.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v
retrieving revision 1.206.2.4
diff -u -p -r1.206.2.4 bootstrap.inc
--- includes/bootstrap.inc	18 Aug 2008 18:56:30 -0000	1.206.2.4
+++ includes/bootstrap.inc	21 Aug 2008 11:58:01 -0000
@@ -738,7 +738,10 @@ function drupal_validate_utf8($text) {
  */
 function request_uri() {
 
-  if (isset($_SERVER['REQUEST_URI'])) {
+  if (isset($_SERVER['HTTP_X_ORIGINAL_URL'])) {
+    $uri = $_SERVER['HTTP_X_ORIGINAL_URL'];
+  }
+  else if (isset($_SERVER['REQUEST_URI']) && strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS/7') === FALSE) {
     $uri = $_SERVER['REQUEST_URI'];
   }
   else {
@@ -752,7 +755,6 @@ function request_uri() {
       $uri = $_SERVER['SCRIPT_NAME'];
     }
   }
-
   return $uri;
 }
 