Forums

[resolved] Logging In rewrites siteurl for each multisite (6 posts)

  1. 5t3ph
    Member
    Posted 6 months ago #

    I have multisite installed and two subdirectory sites.

    The initial install was working, but now something about logging in causes the siteurl to be rewritten for all three sites.

    Sometimes it happens when logging in through the main site, sometimes when through domain.com/site1

    Instead of their respective urls, sometimes they all become http://www.domain.com, when they should be domain.com, domain.com/site1, domain.com/site2, domain.com/site3. Adding www causes an infinite loop for the main site.

    Other times the /subsite just is removed, and only for one of the subsites, not the other.

    Oddly, only the main site is affected publicly, while the others only prevent logging into the admin.

    Deactivating plugins still lets the issue be created. All of them use the same plugins, and variations of a custom theme.

    To fix temporarily, we can change it through the Network Admin unless the main URL gets rewritten to add www, then we have to change it in the db. But as soon as we login again it's rewritten.

    Thanks for any help!

  2. Ipstenu
    Half-Elf Support Rogue & Mod
    Posted 6 months ago #

    WP shouldn't be rewriting those URLs.. I'd put it down on a plugin or theme. But that really is obscure.

  3. Chip Bennett
    Member
    Posted 6 months ago #

    What @ipstenu said...

    To troubleshoot, I would:

    1) Deactivate all Plugins (don't forget mu-Plugins)
    2) Check .htaccess for odd rewrite rules

    I can't really think of anything else that would be causing this.

  4. 5t3ph
    Member
    Posted 6 months ago #

    Thanks for your comments, guys. We're going to try to move to a development server to check through plugins.

  5. Brenderous
    Member
    Posted 5 months ago #

    Any developments on this? I'm having the same problem. We didn't have this issue in dev, only started happening once we went live.

    Right now I'm just thinking of forcing people to login using the main site, or editing the wp-admin files to get the correct url.

  6. Brenderous
    Member
    Posted 4 months ago #

    Apparently we had left a piece of code in the wp-config:

    define('RELOCATE',true);

    We must have left it in there when we were moving the site to a new domain.

Reply

You must log in to post.

About this Topic