[resolved] define( 'MULTISITE', true ); causes too many redirects (9 posts)

  1. Picklefall
    Posted 5 years ago #

    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?

  2. cbmc
    Posted 5 years ago #

    You're trying to view the site from the machine it is installed on?

  3. 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.

  4. Picklefall
    Posted 5 years ago #

    @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.

  5. 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.

  6. Picklefall
    Posted 5 years ago #

    I almost have it working now. I changed the line

    define( 'DOMAIN_CURRENT_SITE', 'localhost' ); to
    define( 'DOMAIN_CURRENT_SITE', 'wordpress.dev' );

    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 wordpress.dev, 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?

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

  8. Picklefall
    Posted 5 years ago #

    yes. Do I need to reinstall wordpress now?

  9. Picklefall
    Posted 5 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic