Support » Networking WordPress » define( ‘MULTISITE’, true ); causes too many redirects

  • Resolved Picklefall


    When I follow all the instructions for turning on networking via subdirectory or subdomain, either way, I get

    “Safari can’t open the page.
    Too many redirects occurred trying to open “http://localhost:80/”. This might occur if you open a page that is redirected to open another page which then is redirected to open the original page.”

    I’ve tried everything I could find on forums:
    -commenting out the define( ‘DOMAIN_CURRENT_SITE’, ‘localhost:80’ ); line
    -adding this line define(‘NOBLOGREDIRECT’, ‘http://localhost:80/’); to the wp-config file
    -adding define( ‘SUNRISE’, ‘on’ ); to the wp-config
    -tweaking the .htaccess file in various ways
    -changing configuration settings in MAMP
    -clearing cookies and the cache
    -adding define( ‘SUNRISE’, ‘on’ );
    -I even reinstalled wp3.0 five different times and one of those times I took all the contents out of the wordpress folder and dumped them directly into the htdocs folder as one forum post said to do.

    None of this has worked. I don’t know if this is a quirk of using a Mac and using MAMP. Here is the base url for the site: http://localhost:80/
    I’ve tried deleting out the :80 part in the url bar and it gets redirected back to http://localhost:80/
    Here is my Mamp Apache document root path: /Applications/MAMP/htdocs/
    (I tried this with and without the trailing slash)

    What am I doing wrong?

Viewing 8 replies - 1 through 8 (of 8 total)
  • You’re trying to view the site from the machine it is installed on?

    Andrea Rennick


    Customer Care at Copyblogger Media and Studiopress

    Can’t enable the network on a domain with a port number in the URL.

    Make a fake domain in your hosts file, use that.

    @andrea_r: I made a virtual host for this site and I still got the redirect errors. What else should I try?

    @cbmc: Yes, I’m trying to view the site from the same machine it’s installed on. It works all the way up to where I define MULTISITE in the wp-config. In fact, if I comment just that one line, everything behaves itself just fine.

    Andrea Rennick


    Customer Care at Copyblogger Media and Studiopress

    Sorry to say most of what you tried above was irrelevant. :-/

    What’s your virtual host name? (Yes, I know I can’t get to it.)

    Make sure you have a clean wp-config.php file that has no references at all to anything multisite, networks or MU. See the sample on in the zip to start.

    Then make sure you put the define line somewhere in the middle of the wp-config file. Not the beginning, not the end.

    I almost have it working now. I changed the line

    define( ‘DOMAIN_CURRENT_SITE’, ‘localhost’ ); to
    define( ‘DOMAIN_CURRENT_SITE’, ‘’ );

    And the redirect problems are gone. Now I’m getting this message:

    Error establishing database connection.

    I’ve tried changing several fields in the db to match, but that doesn’t work. I’ve even tried different entries for the db hostname in wp-config and none of them work, either. What can I do now?

    Andrea Rennick


    Customer Care at Copyblogger Media and Studiopress

    And WordPress is already installed and running *before* you add the lines for the network?

    yes. Do I need to reinstall wordpress now?

    I got it to work! I had to reinstall and set the database host name to, too. Also, when I reinstalled, I had to delete out the :80 from the url bar that the redirect somehow put in there.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘define( ‘MULTISITE’, true ); causes too many redirects’ is closed to new replies.