diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index 9780ed2..3d7d6fc 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -558,9 +558,9 @@ function conf_path($require_settings = TRUE, $reset = FALSE) {
     return $conf;
   }
 
-  $script_name = $_SERVER['SCRIPT_NAME'];
+  $script_name = $_SERVER['SCRIPT_FILENAME'];
   if (!$script_name) {
-    $script_name = $_SERVER['SCRIPT_FILENAME'];
+    $script_name = $_SERVER['SCRIPT_NAME'];
   }
   $http_host = $_SERVER['HTTP_HOST'];
   $conf = find_conf_path($http_host, $script_name, $require_settings);
