diff --git a/.htaccess b/.htaccess
index a69bdd4..2a2690c 100644
--- a/.htaccess
+++ b/.htaccess
@@ -95,7 +95,7 @@ DirectoryIndex index.php index.html index.htm
   #
   # If your site is running in a VirtualDocumentRoot at http://example.com/,
   # uncomment the following line:
-  # RewriteBase /
+  RewriteBase /
 
   # Redirect common PHP files to their new locations.
   RewriteCond %{REQUEST_URI} ^(.*)?/(update.php) [OR]
diff --git a/core/includes/update.inc b/core/includes/update.inc
index 1a2a242..487d968 100644
--- a/core/includes/update.inc
+++ b/core/includes/update.inc
@@ -246,9 +246,9 @@ function update_module_add_to_system($modules = array()) {
 function update_fix_d8_requirements() {
   global $conf;
 
-  if (drupal_get_installed_schema_version('system') < 8000 && !variable_get('update_d8_requirements', FALSE)) {
+  if (drupal_get_installed_schema_version('system') < 8000 && !update_variable_get_0('update_d8_requirements', FALSE)) {
     // @todo: Make critical, first-run changes to the database here.
-    variable_set('update_d8_requirements', TRUE);
+    update_variable_set_0('update_d8_requirements', TRUE);
   }
 }
 
@@ -285,6 +285,62 @@ function update_module_enable(array $modules) {
 }
 
 /**
+ * Sets a persistent variable during the 7.x-8.x upgrade path.
+ *
+ * Case-sensitivity of the variable_* functions depends on the database
+ * collation used. To avoid problems, always use lower case for persistent
+ * variable names.
+ *
+ * @param $name
+ *   The name of the variable to set.
+ * @param $value
+ *   The value to set. This can be any PHP data type; these functions take care
+ *   of serialization as necessary.
+ *
+ * @see variable_del()
+ * @see variable_get()
+ */
+function update_variable_set_0($name, $value) {
+  db_merge('variable')->key(array('name' => $name))->fields(array('value' => serialize($value)))->execute();
+  $GLOBALS['conf'][$name] = $value;
+}
+
+/**
+ * Get the value of a variable directly from the database.
+ *
+ * Use this instead of variable_get() during the upgrade path.
+ *
+ * @param $name
+ *   The name of the variable.
+ * @param $default
+ *   The default value of the variable.
+ *
+ * @return
+ *   The value of the variable in the database unserialized, or NULL if not set.
+ */
+function update_variable_get_0($name, $default = NULL) {
+  $value = $default;
+  $result = db_query('SELECT value FROM {variable} WHERE name = :name', array(':name' => $name))->fetchField();
+  if ($result) {
+    $value = unserialize($result);
+  }
+  return $value;
+}
+
+/**
+ * Delete a variable from the database.
+ *
+ * Use this during the 7.x-8.x upgrade path instead of variable_del().
+ * @param $name
+ *   The name of the variable to undefine.
+ */
+function update_variable_del_0($name) {
+  db_delete('variable')
+    ->condition('name', $name)
+    ->execute();
+}
+
+/**
  * Perform one update and store the results for display on finished page.
  *
  * If an update function completes successfully, it should return a message
