The MU forums have moved to WordPress.org

Redirect loop when logging on after a blog is created (50 posts)

  1. lnuxguy
    Member
    Posted 15 years ago #

    I just installed MU, no problems. I added a user, logged in as them, created a blog, logged out, then logged back in. I immediately get a redirect loop when the (new) user's wp-admin page is trying to come up. I've recreated this site MANY times.

    Ideas?

  2. andrea_r
    Moderator
    Posted 15 years ago #

    Take out all the secret salt / key whatever chunk of stuff in the wp-config file, try again.

    Then when you login, it'll give you new keys. Plunks those ones back in config.

  3. lnuxguy
    Member
    Posted 15 years ago #

    I did that, and added in all the new lines into wp-config. I still get the redirect loop. This is only for non-admin accounts who have blogs. If I log in as admin, or as a user without a blog, it works fine.

    I am using subdirectories for blogs, not subdomains.

  4. VentureMaker
    Member
    Posted 15 years ago #

    Try adding this into wp-config.php

    define('ADMIN_COOKIE_PATH', '/');
    define('COOKIE_DOMAIN', '');
    define('COOKIEPATH', '');
    define('SITECOOKIEPATH', '');

  5. lnuxguy
    Member
    Posted 15 years ago #

    Nope, I still get the redirection loop.

  6. lnuxguy
    Member
    Posted 15 years ago #

    I'm still having this issue. Ideas??

  7. dantowitz
    Member
    Posted 15 years ago #

    This worked for me:

    Try adding this into wp-config.php

    define('ADMIN_COOKIE_PATH', '/');
    define('COOKIE_DOMAIN', '');
    define('COOKIEPATH', '');
    define('SITECOOKIEPATH', '');

  8. VentureMaker
    Member
    Posted 15 years ago #

    Do YOU (I mean ONLY YOU) get a redirect loop? Or do all your users get it?
    If it's ONLY YOU - go clear your browser cache and cookies :)

  9. juanfe
    Member
    Posted 15 years ago #

    Thank you dantowitz. It worked straightway for me.

    Cheers!!

  10. lnuxguy
    Member
    Posted 15 years ago #

    This happens to all users. I've cleared my cache, and observed this in IE and Firefox.

  11. jskov
    Member
    Posted 15 years ago #

    I get it too. I just erased all of the files on this server, created a new database, and re-installed WPMU. I have cleared the cache, etc.

    Any other ideas?

  12. VentureMaker
    Member
    Posted 15 years ago #

    What is session save path in your php.ini?

  13. lnuxguy
    Member
    Posted 15 years ago #

    D:\temp

  14. lnuxguy
    Member
    Posted 15 years ago #

    I have the new-blog-defaults plugin, and the LDAPauth plugin in my mu-plugins directory. I deleted these plugins out of the folder, and I still get the redirection problem.

  15. VentureMaker
    Member
    Posted 15 years ago #

    D:\temp? So you're on Windows? What about mod_rewrite on Windows?

  16. lnuxguy
    Member
    Posted 15 years ago #

    I use ISAPI_Rewrite, which can use the .htaccess files as is.

  17. lnuxguy
    Member
    Posted 15 years ago #

    I added this to the top of the wp-config.php file, and it fixed it!!

    $_SERVER[ 'REQUEST_URI' ] = $_SERVER[ 'HTTP_X_ORIGINAL_URL' ];

    I'm using subdirectories, but it's supposed to work for subdomains, also.

  18. VentureMaker
    Member
    Posted 15 years ago #

    You should have mentioned windows in your first post :)

  19. lnuxguy
    Member
    Posted 15 years ago #

    You should have asked in your first post, if you wanted to know. :)

    Wordpress *does* run on Windows and IIS. You cannot assume anyone is running on one platform or another.

  20. transom
    Member
    Posted 15 years ago #

    On Media Temple(GS) using the subdirectory install (subdomain worked fine). I was able to resolve this problem by adding this code to the top of wp-config.php.

    // Hack for redirect loop per http://mu.wordpress.org/forums/topic.php?id=9872
    $_SERVER[ 'REQUEST_URI' ] = $_SERVER[ 'HTTP_X_ORIGINAL_URL' ];
    define('ADMIN_COOKIE_PATH', '/');
    define('COOKIE_DOMAIN', '');
    define('COOKIEPATH', '');
    define('SITECOOKIEPATH', '');

    I also changed the SECRET_SALT to all text. But it wasn't until I deleted my cookies from the site that things began to work.
    I actually think the majority of the problem is that I installed the subdomain option first (by mistake), logged in, realized my mistake. Reinstalled but still had the cookies from the earlier installation.

  21. transom
    Member
    Posted 15 years ago #

    Sorry - problem persists - even after doing all of the above.

  22. sketchinghouse
    Member
    Posted 15 years ago #

    I have the same problem. I tried adding $_SERVER[ 'REQUEST_URI' ] = $_SERVER[ 'HTTP_X_ORIGINAL_URL' ]; at the top and I just got a redirect loop on the entire page. Then I literally put it at the top of my php file and this seemed to fix the problem, but I got an error message at the top of the screen:

    $_SERVER[ 'REQUEST_URI' ] = $_SERVER[ 'HTTP_X_ORIGINAL_URL' ];
    Warning: Cannot modify header information - headers already sent by (output started at /hermes/web05/b1329/pow.kitanaikura/htdocs/wp-config.php:2) in /hermes/web05/b1329/pow.kitanaikura/htdocs/wp-content/plugins/ylsy_permalink_redirect.php on line 389

    In addition, when I log out I get the same message 17 times. Any suggestions on how to fix this?

  23. VentureMaker
    Member
    Posted 15 years ago #

    /wp-content/plugins/ylsy_permalink_redirect.php - looks like this is your problem.

    Look for extra whitespace at the end of this file or try disabling this plugin

  24. tzmartin
    Member
    Posted 15 years ago #

    I had this same issue with version 2.6.5 on LAMP stack. Firefox 3.0. From my experience, Redirect Loops are usually an issue with cookies / session management. So I tracked it down to confirm:

    Steps to recreate the Redirect Loop...
    Fresh install selecting "sub-domain" blog address.
    Logged in as admin.
    Logged out.
    Removed database tables, .htaccess and wp-config.php file.
    Fresh install with "sub-directory" blog address.
    Attempted to log in, but failed with Redirect Loop.

    I added the hack from @transom (http://mu.wordpress.org/forums/topic.php?id=9872#post-62131)... didn't work.

    I deleted cookies... didn't work.

    I removed the @transom hack and deleted cookies: it worked.

    Problem solved.

  25. rawsonalex
    Member
    Posted 15 years ago #

    from a similar thread at
    http://wordpress.org/support/topic/201195?replies=17#post-957846

    I had this problem and it was caused by plugins. I had to make them inactive one by one, and by trial and error it resolved itself.

    Here's how I did it: Go into wp-content/plugins and create new folder called "disabled". Drag plugin folders into the "disabled" folder one by one(thus changing the file structure), and refresh the login page each time. For me it was Wordpress Tweaks, but it seems it was different for everyone. There are many threads out there like this one, please spread the word.

  26. andrea_r
    Moderator
    Posted 15 years ago #

    That's pretty much basic WP troubleshooting.

  27. aelroy
    Member
    Posted 15 years ago #

    Had a simillar problem. After install every access to the domain resulted in a redirect loop error.

    Turned out the install did not complete though no error message was reported, instead it went into the loop.

    I am suspecting it had to do with the fact the install was done before the domain name was actually pointed at the server. I don't have any other explanation.

    After deleting the install and re-uploading and installing, all was well.

  28. chipman78
    Member
    Posted 15 years ago #

    Any updates on this? Any other ideas on a fix? I have a fresh install on my site's root, and a sub-dir, and tried both the subdomain and subdir options upon installation.

    I clean-reinstalled it several times, have no plugins (it's a fresh install of 2.7), and am getting the homepage redirect loop, as well as the inability to login.

    No modifications mentioned above to wp-config.php worked for me.

    Thoughts?

  29. geraldrsc
    Member
    Posted 15 years ago #

    I was having the same problem. I cleared cookies on my browser and it worked.

  30. mjmichaelw
    Member
    Posted 15 years ago #

    I have just installed MU 2.7 and have had the same problems described here. The problem I found was when I went to the default post - Hello World - then I got the redirect error but if I went to any other link then the problem didnt exist.

    So I added a 2nd post quickly and published. Viewed the blog and selected the new post link and the page came up fine.When I clicked on Hello World the problem had gone. No files were edited and no re-installs were necessary.

    I have no idea why this would happen but it resolved the issue . I then activated all the plug-ins and all is well

About this Topic

  • Started 15 years ago by lnuxguy
  • Latest reply from TracyReaderDad