• Resolved Ooypunk

    (@ooypunk)


    Hello,
    I was trying to enable the multi site functionality, but I keep getting a redirect loop error.
    I followed all the instructions to the letter; I first tried these: https://codex.www.ads-software.com/Create_A_Network, then these: https://wpebooks.com/2010/09/how-to-enable-multisite-in-wordpress/. All is well, until I am asked to log in again; that’s when the redirect loop appears.

    It’s probably worth mentioning that I am trying to upgrade an existing site (hence version 3.2.1 instead of the latest). I am on my testing server (Apache 2 on Debian, in a VirtualBox on my Windows 7 PC); I declared the site as a VirtualHost in Apache, with the domain name the same as the live version, but having it redirected in the hosts file to 127.0.0.1.

    I have checked on Firefox and Epiphany. Throwing away the cookies helped nothing.

    I hope this is enough information; if not, please ask what is needed, I am happy to provide more.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter Ooypunk

    (@ooypunk)

    Update:
    I tried looking into the code and found out the redirect happens in ms-settings.php on line 94. After seeing that, I tried adding the NOBLOGREDIRECT define to the config, like this:
    define( 'NOBLOGREDIRECT', 'https://www.mydomain.net' );(domain is the same as defined in the Apache VirtualHost)

    This did one thing: instead of redirecting to https://www.mydomain.net/wp-signup.php?new=www.mydomain.net, it redirects to https://www.mydomain.net itself. But it still keeps looping.
    I don’t understand: if WP wants to redirect me to the login-page, why does it try to redirect to wp-signup, instead of wp-login? Something I forgot to install, or didn’t configure properly?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Normally that happens when you set up your domain as https://www.domain.com and not just domain.com (yes, without the www is preferred). You should have gotten a warning about that when you set up MultiSite.

    Thread Starter Ooypunk

    (@ooypunk)

    Thanks, Ipstenu.

    I tried again and indeed, now that notice came up. I changed both the ‘WordPress address’ and ‘Site address’ (not sure which one you meant) and the notice didn’t appear again.
    But after that the problem itself (the loop) appeared again.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    When you ‘tried again’ did you delete the DB?

    Thread Starter Ooypunk

    (@ooypunk)

    No. I didn’t know that was necessary?
    What part should be deleted?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Is this a brand new, nothings been installed, site? If so, delete everything.

    If not, you’ll want to do this: https://wpmututorials.com/how-to/how-to-disable-multisite/

    Thread Starter Ooypunk

    (@ooypunk)

    Thanks for the link. It pointed me in the right direction, I think.
    I couldn’t find the database tables mentioned in that page, so I tried setting up again to see when they should be added to the database. That didn’t happen (without any error notice(!)) and I got the loop again. Then I checked the privileges of the database user and found that the user didn’t have the create privileges. I gave it all privileges and then they got added and the loop was gone!

    Thanks for the help!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘multi-site – trying to enable but stuck in redirect loop’ is closed to new replies.