The MU forums have moved to WordPress.org

How to fix wp-config.php redirect loop? (1 post)

  1. rcwatson
    Member
    Posted 14 years ago #

    We're setting up an intranet using WPMU and are having problems with a mysterious redirect loop we've never seen before. We've actually had this same system up and running for 2 years and are just moving it to a new server. The message we're getting (at least in Chrome browsers) is:

    This webpage has a redirect loop.

    The webpage at http://blogs.example.net/wp-signup.php?new=blogs.example.net has resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer.

    The DNS is set up identically to the instance of WPMU that is working correctly, just with a different IP and domain. The contents of the wp-config.php file is as follows (altered to protect the system, of course):

    <?php
    /**
     * The base configurations of the WordPress.
     *
     **************************************************************************
     * Do not try to create this file manually. Read the README.txt and run the
     * web installer.
     **************************************************************************
     *
     * This file has the following configurations: MySQL settings, Table Prefix,
     * Secret Keys, WordPress Language, and ABSPATH.
     *
     * This file is used by the wp-config.php creation script during the
     * installation.
     *
     * @package WordPress
     */
    
    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('WP_CACHE', true); //Added by WP-Cache Manager
    define('DB_NAME', 'wordpressmu');
    
    /** MySQL database username */
    define('DB_USER', 'username');
    
    /** MySQL database password */
    define('DB_PASSWORD', 'password');
    
    /** MySQL hostname */
    define('DB_HOST', 'localhost');
    
    /** 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', '');
    define('VHOST', 'yes');
    $base = '/';
    define('DOMAIN_CURRENT_SITE', 'blogs.example.net' );
    define('PATH_CURRENT_SITE', '/' );
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOGID_CURRENT_SITE', '1' );
    
    /**#@+
     * Authentication Unique Keys.
     *
     * Change these to different unique phrases!
     * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/ WordPress.org secret-key service}
     *
     * @since 2.6.0
     */
    define('AUTH_KEY', '---------------------------------------------');
    define('SECURE_AUTH_KEY', '---------------------------------------------');
    define('LOGGED_IN_KEY', '---------------------------------------------');
    define('NONCE_KEY', '---------------------------------------------');
    define('AUTH_SALT', '---------------------------------------------');
    define('LOGGED_IN_SALT', '---------------------------------------------');
    define('SECURE_AUTH_SALT', '---------------------------------------------');
    /**#@-*/
    
    /**
     * 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  = 'wp_';
    
    /**
     * WordPress Localized Language, defaults to English.
     *
     * Change this to localize WordPress.  A corresponding MO file for the chosen
     * language must be installed to wp-content/languages. For example, install
     * de.mo to wp-content/languages and set WPLANG to 'de' to enable German
     * language support.
     */
    define ('WPLANG', '');
    
    // double check $base
    if( $base == 'BASE' )
            die( 'Problem in wp-config.php - $base is set to BASE when it should be the path like "/" or "/blogs/"! Please fix it!' );
    
    // uncomment this to enable wp-content/sunrise.php support
    //define( 'SUNRISE', 'on' );
    
    // uncomment to move wp-content/blogs.dir to another relative path
    // remember to change WP_CONTENT too.
    // define( "UPLOADBLOGSDIR", "fileserver" );
    
    // If VHOST is 'yes' uncomment and set this to a URL to redirect if a blog does not exist or is a 404 on the main blog. (Useful if signup is disabled)
    // For example, the browser will redirect to http://examples.com/ for the following: define( 'NOBLOGREDIRECT', 'http://example.com/' );
    // Set this value to %siteurl% to redirect to the root of the site
    // define( 'NOBLOGREDIRECT', '' );
    // On a directory based install you must use the theme 404 handler.
    
    // Location of mu-plugins
    // define( 'WPMU_PLUGIN_DIR', '' );
    // define( 'WPMU_PLUGIN_URL', '' );
    // define( 'MUPLUGINDIR', 'wp-content/mu-plugins' );
    
    // Uncomment to disable the site admin bar
    //define( 'NOADMINBAR', 1 );
    
    define( "WP_USE_MULTIPLE_DB", false );
    
    /* That's all, stop editing! Happy blogging. */
    
    /** WordPress 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');
    ?>

    Thanks for any help you can provide.

About this Topic

  • Started 14 years ago by rcwatson