WP Multisite: login loop to network admin // main site links redirect all to homepage

Hi,
I have set up a multisite installation and this is the first time I have this loop issue where i am not able to access the network admin area.

I can access the admin area of each site though.
On the main site (ID 1) all the links redirect to the home. so domain.com/page/ goes to domain.com, no error message.
The other sites work fine, site ID 2 works perfectly, no strange redirects etc. It seems an issue of the main site only.

I was investigating several hours already, tried all the tricks of deleting cookies etc.
(http://tommcfarlin.com/resolving-the-wordpress-multisite-redirect-loop/)
Now I'm frustrated and temporarily removed the multisite function so at least the main site works.

All this happend after the domain was updated (the site has been installed using the ip address as domain, and later i updated the data base entries and everything with the domain name. double and tripple checked that already.

I hope you can help me out?
Thanks!
Mandy

  • Brian Purkiss
    • Smushie Pies

    Not gonna lie. This is a tough one.

    Almost sounds like something is wrong with your htaccess.

    Think you could take a look at that file and see if the old IP address is there?

    if it isn't, think you could email it to me? If so, please send a message with my name in the subject and a link to this thread through our contact form.

  • Paul Barthmaier
    • Code Wrangler

    Hi there,

    In addition to the database entries for SiteURL and Home, what does your wp-config.php say is your home? I'm interested in knowing what you have here:

    define('DOMAIN_CURRENT_SITE', 'mydomain.com');
    define('PATH_CURRENT_SITE', '/');

    I think this is likely a potential problem area. Let's see if this helps.

    Cheers,
    Paul

    Enable theme for a single site in Multisite? Try: http://marker.to/a94mht

  • Mandy
    • New Recruit

    Hi guys,
    thanks for your comments! I checked the wp-config, here the data (domain.com is just an example, there is the "real" domain included in the original file):

    define('WP_ALLOW_MULTISITE', true);
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false);
    $base = '/';
    define('DOMAIN_CURRENT_SITE', 'domain.com');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);

    The .htaccess looks like this:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    I hope you can see something suspicious there... :slight_smile:

    Thanks for your help!!
    Mandy

  • Paul Barthmaier
    • Code Wrangler

    Hi Mandy,

    This last bit is confusing because at the point when you add the line above, you don't yet have a site two, only the main site. You say the redirect issue arises then?

    There are two suggestions that I see, the first is to wrap your htaccess in an IfModule statement, which I'm never sure when to use, but it may help here.

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]
    </IfModule>

    The second suggestion concerns the use of /blog/ which is normally inserted into the URL structure of sites converted to Multisite using subdirectories if the site has existed for more than a few days.

    Hope this helps! Let us know how it goes.

    Cheers,
    Paul

    Locked yourself in EasyBlogging? Relax: http://goo.gl/R3gJr

  • Mandy
    • New Recruit

    Hi Paul,
    thanks for your reply!
    I tried both - added the IfModule to the htaccess and also added /blog/ in the permalinks... both didn't help. :slight_frown:

    I'm a little lost... thinking about setting it up all again in a new folder. But I hope I don't have to!
    Any other idea I could try?

    Mandy

  • Mike
    • New Recruit

    Hi @Mandy

    We're just doing a little housekeeping to see if we have dropped the ball anywhere. We haven't replied here for over 6 months which is obviously not good enough. And I apologise for that.

    Do you still have this issue?

    Cheers,
    Mike

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.