--- globalredirect.module	2008-07-03 17:35:29.000000000 +0300
+++ globalredirect.module	2008-07-04 19:54:57.000000000 +0300
@@ -22,7 +22,7 @@ function globalredirect_init() {
   //We need to do a test to make sure we only clean up URL's for the main request. This stops modules such as
   //  the Ad Module which had its own script in its folder doing a bootstrap which invoked hook_init and caused some banners to get "cleaned up"
   //  See issue: http://drupal.org/node/205810
-  if ($_SERVER['SCRIPT_NAME'] != '/index.php') return false;
+  if ($_SERVER['SCRIPT_NAME'] != $GLOBALS['base_path'].'index.php') return false;
 
   /**
    * We need to make sure this hook only fires in certain conditions:
