diff --git a/globalredirect.install b/globalredirect.install
index 95ef366..49f7217 100644
--- a/globalredirect.install
+++ b/globalredirect.install
@@ -66,3 +66,13 @@ function globalredirect_update_6101() {
 
   return array();
 }
+
+/**
+ * Set globalredirect to load during bootstrap phase.
+ */
+function globalredirect_update_6102() {
+  $ret = array();
+  $ret[] = update_sql("UPDATE {system} SET bootstrap=1 WHERE name='globalredirect'");
+
+  return $ret;
+}
diff --git a/globalredirect.module b/globalredirect.module
index cce7582..9ae394f 100644
--- a/globalredirect.module
+++ b/globalredirect.module
@@ -17,6 +17,38 @@ function globalredirect_help($path, $arg) {
 }
 
 /**
+ * Implements hook_boot().
+ */
+function globalredirect_boot() {
+  global $user, $language;
+  $cache = variable_get('cache', CACHE_DISABLED);
+  $language_negotiation = variable_get('language_negotiation', LANGUAGE_NEGOTIATION_NONE);
+
+  /** 
+   * If this is the front page, we have an anonymous user, page cache is enabled
+   * and browser language negotiation is set, we modify the CID from which we'll
+   * get our cache. If it exists, load it. Otherwise, proceed as usual.
+   */
+  if (!isset($_GET['q']) && empty($user->uid) && $cache != CACHE_DISABLED && $language_negotiation == LANGUAGE_NEGOTIATION_PATH) {
+    // Initialize language to properly negotiation set our language prefix.
+    drupal_bootstrap(DRUPAL_BOOTSTRAP_LANGUAGE);
+
+    // If there is a language prefix, redirection will be handled normally in our init hook.
+    if (empty($language->prefix)) {
+      // Trick request_uri() into using a language prefixed URL for our CID.
+      $_SERVER['REQUEST_URI'] .= $language->language;
+      $page_cache = page_get_cache();
+      // If the page is cached, display it.
+      if ($page_cache) {
+        drupal_page_cache_header($page_cache);
+        bootstrap_invoke_all('exit');
+        exit;
+      }
+    }
+  }
+}
+
+/**
  * Implements hook_init().
  */
 function globalredirect_init() {
@@ -43,6 +75,11 @@ function globalredirect_init() {
     }
   }
 
+  // If Q isn't set, we're on the front page, but we may still need to redirect.
+  if (!isset($_REQUEST['q'])) {
+    $_REQUEST['q'] = '';
+  }
+
   // Store the destination from the $_REQUEST as it breaks things if we leave
   // it in - restore it at the end...
   if (isset($_REQUEST['destination'])) {
