title: WordPress 4.7.2 update on multisite causes wp-admin redirect loop
body: <p>I have a website running multisite using a subdirectory setup. I have just tried updating my site to 4.7.2 and the update goes through and no errors happen during the installation, but then after the install is finished I am redirected to /wp-admin/network/about.php?updated which returns a 404 page. So then I try to go back to /wp-admin/ and I get a redirect loop error.</p>
  
  <p>I have looked through at least 40 different articles, forums, and websites about WordPress multisite wp-admin redirect loop issues. I have tried everything I can possibly find to fix this issue, but nothing has worked. The main site works perfectly fine, but wp-admin is completely unaccessible.</p>
  
  <p>Here are the things I have tried so far:</p>
  
  <ol>
  <li>I tried clearing my cache and cookies multiple times, and the site is not using any caching plugins</li>
  <li>I renamed my plugins folder to plugins.deactivate
  Just to be extra thorough I also updated active_plugins field in the wp_options table to a:0:{}</li>
  <li>I tried removing multisite definitions from my wp-config.php file, but when that had no effect I put them back</li>
  <li>I confirmed my .htaccess file matches the one listed here for 3.5+ multisite – <a href="https://codex.wordpress.org/Multisite_Network_Administration#.htaccess_and_Mod_Rewrite" rel="nofollow noreferrer">https://codex.wordpress.org/Multisite_Network_Administration#.htaccess_and_Mod_Rewrite</a></li>
  <li>I also tried switching it to the old version, just in case, but that did nothing so I switched it back.</li>
  <li>I found a forum saying that they fixed the issue by commenting out a redirect at the bottom of /wp-admin/network/admin.php so I tried that but it did nothing so I uncommented it back to normal.</li>
  <li>I found another forum saying you need to define cookie paths in wp-config.php. So I had tried that by adding the code below to my wp-config.php, but it didn’t work either so I removed it.</li>
  </ol>
  
  <p>Cookie path code I tried:</p>
  
  <pre><code>define('ADMIN_COOKIE_PATH', '/');
  define('COOKIE_DOMAIN', '');
  define('COOKIEPATH', '');
  define('SITECOOKIEPATH', ''); 
  </code></pre>
  
  <p>Here is my .htaccess file:</p>
  
  <pre><code>RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.php$ - [L]
  
  # add a trailing slash to /wp-admin
  RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
  
  RewriteCond %{REQUEST_FILENAME} -f [OR]
  RewriteCond %{REQUEST_FILENAME} -d
  RewriteRule ^ - [L]
  RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
  RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
  RewriteRule . index.php [L]
  </code></pre>
  
  <p>Here is my wp-config.php file:</p>
  
  <pre><code>&lt;?php
  /**
   * The base configuration for WordPress
   *
   * The wp-config.php creation script uses this file during the
   * installation. You don't have to use the web site, you can
   * copy this file to "wp-config.php" and fill in the values.
   *
   * This file contains the following configurations:
   *
   * * MySQL settings
   * * Secret keys
   * * Database table prefix
   * * ABSPATH
   *
   * @link https://codex.wordpress.org/Editing_wp-config.php
   *
   * @package WordPress
   */
  
  // ** MySQL settings - You can get this info from your web host ** //
  /** The name of the database for WordPress */
  define('DB_NAME', 'DBNAME');
  
  /** MySQL database username */
  define('DB_USER', 'DBUNAME');
  
  /** MySQL database password */
  define('DB_PASSWORD', 'DBPASS');
  
  /** MySQL hostname */
  define('DB_HOST', 'DBHOST');
  
  /** Database Charset to use in creating database tables. */
  define('DB_CHARSET', 'utf8');
  
  /** The Database Collate type. Don't change this if in doubt. */
  define('DB_COLLATE', '');
  
  /**#@+
   * Authentication Unique Keys and Salts.
   *
   * Change these to different unique phrases!
   * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
   * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
   *
   * @since 2.6.0
   */
  define('AUTH_KEY',         'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX');
  define('SECURE_AUTH_KEY',  'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX');
  define('LOGGED_IN_KEY',    'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX');
  define('NONCE_KEY',        'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX');
  define('AUTH_SALT',        'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX');
  define('SECURE_AUTH_SALT', 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX');
  define('LOGGED_IN_SALT',   'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX');
  define('NONCE_SALT',       'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX');
  
  /**
   * Other customizations.
   */
  define('FS_METHOD','direct');define('FS_CHMOD_DIR',0777);define('FS_CHMOD_FILE',0666);
  define('WP_TEMP_DIR',dirname(__FILE__).'/wp-content/uploads');
  
  /**
   * Turn off automatic updates since these are managed upstream.
   */
  define('AUTOMATIC_UPDATER_DISABLED', true);
  
  
  /**#@-*/
  
  /**
   * WordPress Database Table prefix.
   *
   * You can have multiple installations in one database if you give each
   * a unique prefix. Only numbers, letters, and underscores please!
   */
  $table_prefix  = 'XXXXXX';
  
  /**
   * For developers: WordPress debugging mode.
   *
   * Change this to true to enable the display of notices during development.
   * It is strongly recommended that plugin and theme developers use WP_DEBUG
   * in their development environments.
   *
   * For information on other constants that can be used for debugging,
   * visit the Codex.
   *
   * @link https://codex.wordpress.org/Debugging_in_WordPress
   */
  define('WP_DEBUG', false);
  
  define('WP_ALLOW_MULTISITE', true);
  define('MULTISITE', true);
  define('SUBDOMAIN_INSTALL', false);
  define('DOMAIN_CURRENT_SITE', $_SERVER['HTTP_HOST']);
  define('PATH_CURRENT_SITE', '/');
  define('SITE_ID_CURRENT_SITE', 1);
  define('BLOG_ID_CURRENT_SITE', 1);
  
  /* That's all, stop editing! Happy blogging. */
  
  /** Absolute path to the WordPress directory. */
  if ( !defined('ABSPATH') )
      define('ABSPATH', dirname(__FILE__) . '/');
  
  /** Sets up WordPress vars and included files. */
  require_once(ABSPATH . 'wp-settings.php');
  </code></pre>