WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [closed] network admin getting redirect loop (31 posts)

  1. hemant.sathe
    Member
    Posted 3 years ago #

    Hi,

    I have multiple blogs for past more than a year using WPMU. Recently when I upgraded to 3.1, I noticed that the super admin menu is replaced by network admin and when I tried to access the network admin, I am getting redirect loop basically for all URLs starting with /wp-admin/network. I have tried all options like disabling all plugins, removing all plugins, reinstalling fresh copy of 3.1 and changing the config file, reinstalling plugins, installing plugins to block canonical redirects. But so far nothing has worked. The blogs are working OK (have not done extensive testing) but things look good. Only in case of wp-admin/network/* I am getting the redirect loop. Can some one help? Thanks in advance.

    Hemant

  2. hemant.sathe
    Member
    Posted 3 years ago #

    BTW, I am hosting site on godaddy.com. I am the only user and administrator. Not sharing the URL yet since only network admin function is affected.

    Hemant

  3. What's the content of your .htaccess?

  4. I know partly this will be futile, but you'll have to ask GoDaddy support for help.

    on some servers, any foldders under wp-admin are getting ignored.

  5. hemant.sathe
    Member
    Posted 3 years ago #

    Got some resolution. Commented out following code present in wp-config.php

    /*$base = '/';
    define('DOMAIN_CURRENT_SITE', 'domain.com' );
    define('PATH_CURRENT_SITE', '/' );
    define('BLOGID_CURRENT_SITE', '1' );
    define('NOBLOGREDIRECT', 'http://domain.com');*/

    Still testing if everything is OK. But do we need this code for something else? Should I uncomment some part of it?

    Thanks
    Hemant

  6. define('NOBLOGREDIRECT', 'http://domain.com');

    you might still want this bit. but uncommenting the rest shoudl be okay if new blog creation still works fine.

    It's actually part of the install process when you do multi-networks (uncommenting those lines).

  7. sjefen6
    Member
    Posted 3 years ago #

    Had simular issue when upgrading from 3.1 to 3.1.1.

    Tried to disable the lines suggested and found the line that caused the issue.
    For me, the setting of:
    define('DOMAIN_CURRENT_SITE', 'www.domain.tld' );
    had some issues with the www in front of the domain. Removed the www. and network admin worked again.

  8. DJIO
    Member
    Posted 3 years ago #

    ... had some issues with the www in front of the domain. Removed the www. and network admin worked again.

    Same here!
    Problem solved
    =)

  9. Charles McKeever
    Member
    Posted 3 years ago #

    I just found this answer in the WordPress bug Trac. Applying the code update worked for me.

    Multisite 3.1.1 Upgrade Redirect Loop Network Admin & Plugins
    (modifed the code in the file "admin.php" in the path "/wp-admin/network")
    http://core.trac.wordpress.org/ticket/17090

  10. The 'code update' in that ticket is a bad idea. Why? Well it's flagged INVALID, which means updates will overwrite it.

  11. The ticket also noted it was ruled out as a bug.

  12. robpannell
    Member
    Posted 3 years ago #

    I've got this same issue. I've tried everything that has been mentioned in the posts above but to no avail.

    The main difference is that I'm running WP as an internal company intranet, so it's on a local webserver which isn't accessible externally.

    I have the following in my config file, and commenting out doesn't help:

    /** The Database Collate type. Don't change this if in doubt. */
    define('DB_COLLATE', '');
    define('VHOST', 'yes');
    $base = '/subdir/';
    define('DOMAIN_CURRENT_SITE', 'ukintranet.eu.company.net' );
    define('PATH_CURRENT_SITE', '/subdir/' );
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOGID_CURRENT_SITE', '1' );
  13. pencilneck
    Member
    Posted 3 years ago #

    Removing the www in this line:

    define('DOMAIN_CURRENT_SITE', 'www.domain.tld' );

    Worked for me. Doesn't appear to have adversely affected anything else yet.

  14. pencilneck
    Member
    Posted 3 years ago #

    WAIT. Not true.

    Without the www, I'm no longer able to create new sites in my network. My guess is that the abset www invalidates the nonce somehow, and it won't let me proceed.

  15. Shouldn't be related to the nonce, but dump all your cookies and log back in.

  16. chickenrun
    Member
    Posted 3 years ago #

    I'm having the same problem...
    removing the www from define('DOMAIN_CURRENT_SITE', 'www.domain.tld' ); worked...
    now part of the network admin is redirected to the non-www version of the domain...
    is this a bug or something that will be switched back at some point (www.domain.tld network admin available again)?

    Thanks :)

    enrico

  17. I think it's ... well, I'm not sure.

    This keeps coming up, but not for everyone, and my best GUESS is that it's a combination of server setup, DNS, and WordPress.

    See, my DNS is set that http://www.domain.com and domain.com are separate entries, but both point to the same name server. Ditto the vhosts in my httpd.conf file. In WP, I installed everything to be domain.com (cause I subscribe to the 'shorter is better' school of thought). And I know that once I moved to 3.0, I no longer needed my .htaccess tweak of

    RewriteCond %{HTTP_HOST} ^www\.domain\.tld$ [NC]
    RewriteRule ^(.*)$ http://domain.tld/$1 [R=301,L]

    So I presume that WordPress parses this better, not just because of MultiSite (I get the same results on a non-MultiSite WP install), but because of a change in the 3.0 base.

    My gut feeling is that when all those pieces AREN'T aligned correctly, and somewhere in the mix, be it DNS or vhost, that your server things that one or the other should take precedence , WP has a bit of a hissy fit.

  18. robpannell
    Member
    Posted 3 years ago #

    Sadly that doesn't answer it for me I don't think, as it makes zero difference whether the www is present or not in the wp-config. I still have the exact same redirect loop experience.

    I'll check the server setup tomorrow though to ensure everything is consistent.

  19. Xeronimo
    Member
    Posted 3 years ago #

    Same problem here ... I get the 'redirect loop' error and none of the above suggestions have helped so far ...

  20. Xeronimo
    Member
    Posted 3 years ago #

    Ok, it seems I have found the solution! At least for my problem.

    In the table wp_blogs the domains for my networked WP sites were 'mydomain.com' in each case. I changed all of them into 'www.mydomain.com' and now the network part of the admin interface is accessible again!

    And the WP sites seem to still work normally too :)

    Does anyone know though why this suddenly became a problem after the upgrade from 3.1.0 > 3.1.1 ?

  21. robpannell
    Member
    Posted 3 years ago #

    No joy for me, adding the www in that table just gives me a redirect loop for the entire site rather than just the network admin section.

  22. Xeronimo
    Member
    Posted 3 years ago #

    rob:

    Hmm ... what value do you have in your wp-config.php file then at this line:

    define('DOMAIN_CURRENT_SITE', '???');

    I had 'www.mydomain.com' there but only 'mydomain.com' in the wp_blogs table, maybe that way the problem in my case? Since everything worked again once I've added a 'www.' there.

    Also, I'm not working with subdomains but with subfolders. Maybe that's why the domain change didn't mess my whole interface up like in your case? Are you using subdomains?

  23. robpannell
    Member
    Posted 3 years ago #

    it's 'ukintranet.eu.companyname.net' since I'm running WP as an internal site rather than a website.

    If I add www. here, then there is no difference. If I add it in the wp_blogs table then it loops the whole site.

    and yes, I am using subdomains, so that may be the key difference.

  24. robpannell, in your case you don't need the www, obviously :)

    I'm using subdomains as well, but you're using ... nested subdomains (that is you get site2.ukintranet.eu.company.net, right?)

    That said, this:
    define('DOMAIN_CURRENT_SITE', 'ukintranet.eu.company.net' );

    and:
    $base = '/subdir/';

    Are a recipe for things being bizarre. WordPress doesn't like running a network out of a subfolder, and especially not subdomains!

  25. robpannell
    Member
    Posted 3 years ago #

    hmm, thanks. It looks like I'm gonna have to do a couple of fresh standalones & transfer everything across. ouch.

  26. anthon
    Member
    Posted 3 years ago #

    I've got this same issue. I can access the site (although comments won't load), get to the login page. However, if I try to login, it just loops straight back to the login box again.

    I'm running WordPress 3.1 Network on IIS7, SQL Server 2008 w/ sub-domains.

    I have enabled network, and added the following to:

    web.config:

    <rewrite>
    			  <rules>
    				  <rule name="WordPress Rule 1" stopProcessing="true">
    					  <match url="^index\.php$" ignoreCase="false" />
    					  <action type="None" />
    				  </rule>
    				  <rule name="WordPress Rule 2" stopProcessing="true">
    					  <match url="^files/(.+)" ignoreCase="false" />
    					  <action type="Rewrite" url="wp-includes/ms-files.php?file={R:0}" appendQueryString="false" />
    				  </rule>
    				  <rule name="WordPress Rule 3" stopProcessing="true">
    					  <match url="^" ignoreCase="false" />
    					  <conditions logicalGrouping="MatchAny">
    						  <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" />
    						  <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" />
    					  </conditions>
    					  <action type="None" />
    				  </rule>
    				  <rule name="WordPress Rule 4" stopProcessing="true">
    					  <match url="." ignoreCase="false" />
    					  <action type="Rewrite" url="index.php" />
    				  </rule>
    			  </rules>
    		  </rewrite>

    wp-config:

    define( 'MULTISITE', true );
    define( 'SUBDOMAIN_INSTALL', true );
    $base = '/';
    define( 'DOMAIN_CURRENT_SITE', 'svr-web' );
    define( 'PATH_CURRENT_SITE', '/' );
    define( 'SITE_ID_CURRENT_SITE', 1 );
    define( 'BLOG_ID_CURRENT_SITE', 1 );

    Any ideas?

  27. homeruntaz
    Member
    Posted 3 years ago #

    I'm having the same problem as robpannell - but only after I changed the site from non-www to www. The site is up, the admin works but the network admin goes into the infinite loop. If I remove the DOMAIN_CURRENT_SITE, then the network admin works but then none of the site links work(but the site is visible). I have two databases I'm flipping between to figure this out -one with all the links set to non-www and one with all www. I'm guessing there's a mismatch somewhere between non-www and www but don't get where when it only affects network admin?

  28. homeruntaz - this post is both 2 months old AND flagged as resolved, so you're better off making a new topic in these situations.

    Go through your DB and look for any missmatches with your domain.

  29. homeruntaz
    Member
    Posted 3 years ago #

    Found the solution!!!! I changed the url in the blogs table(wp_blogs if you didn't modify it) -it's the only row in the table and once I added the www to it- the site, admin and network admin works!

  30. robpannell
    Member
    Posted 3 years ago #

    Actually in the end, I commented out lines 18 & 19 of wp-admin/network/admin.php

    That did the trick for me.

Topic Closed

This topic has been closed to new replies.

About this Topic