The MU forums have moved to WordPress.org

homepage login redirect error (38 posts)

  1. cburell
    Member
    Posted 17 years ago #

    Hello,

    When I try to login as admin to the same site, I get this error message:

    [quote]The page isn't redirecting properly.
    Firefox has detected that the server is redirecting the request for this address in a way that will never complete. [end quote]

    I sent a help ticket to my server host, and he replied,

    "This seems to be an issue with the Wordpress software. You will need to find out from the developers or their support team how you should define your redirects, etc. The site should work from both a www and non-www prefix."

    So how should I define the redirects (and what might "etc" mean?)?

    Any advice would be blessed. I've got students waiting to write :)

    Thanks~

  2. lunabyte
    Member
    Posted 17 years ago #

    MU does not support the use of the www subdomain. So first you'll need to access the site without it.

    Secondly, it does do several internal redirects. You're host most likely has the allowed value set too low. Ask them to bump it up a bit, which will correct your issue.

  3. drmike
    Member
    Posted 17 years ago #

    For reference, the software redirects a visitor from the www to the non-www version of the URL.

    You're not doing your WPMU install as a parked or addon domain, are you? It should be set within it's own hosting account.

    What's the URL anyway?

  4. cburell
    Member
    Posted 17 years ago #

    Thanks to you both. I'm on the fly, but Dr. M., here's the URL:

    http://kisblogs.org/

    Thanks again~

  5. cburell
    Member
    Posted 17 years ago #

    lunabyte, drmike, my server support is looking into the problem based on your feedback, so thanks for that. Hopefully they'll square things away so I won't need to tug your sleeves about this any more.

    Thanks very much :)

  6. cburell
    Member
    Posted 17 years ago #

    Strange days: The redirect error disappeared yesterday, but came back today. My VPS support says this:

    I do not believe there is a problem with the VPS in regards to how WordPress is not working. Basically what appears to be happening is that when you attempt to log into the admin section of the site, it is redirecting to the wp-login.php script (redirecting to itself) but is caught in an infinite loop, which will never finish. Unless you have done something to cause this, I want to say that this is what the internal redirect that WordPress support was speaking of.

    Here is the exact log snippet of what is happening over and over when trying to log in:

    209.50.224.4 - - [20/Mar/2007:13:37:10 -0400] "GET /wp-admin/ HTTP/1.1" 302 5 "http://kisblogs.org/wp-login.php" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2"

    Can you please contact WordPress support to see if they can give you any further advice?

    As always, thank you~

  7. kosir
    Member
    Posted 17 years ago #

    The same thing is happening to me and I have no idea what is cosing it. It worked fine for some days but now I get this same error.

    I have two users and first I was using FireFox for admin account and IE for other account but eventually I tried to use FF for both so I logged out as admin and logged in as other user. This is the first time I got this error. I cleaned my cookies and it worked.

    But it happened again and now I removed everything from cookies to cache and it still doesn't work so I can't get in my admin panel at all. Firefox give me:

    The page isn't redirecting properly

    Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

    * This problem can sometimes be caused by disabling or refusing to accept cookies.

    But I allow cookies and I can login with no problem to other sites even my non MU Wordpress blogs. When I tried in IE it just keep loading and loading and nothing happened for 5 minutes at least.

    I am using WP MU 1.1.1, PHP 5.1.6, MySQL 4.1.21-standard hosted on Linux. Please help!

    UPDATE:
    Now I tried in Opera and no go. Now I know it's not cookies because it's a clean install of Opera and my Wordpress MU page was the only page I visited in Opera. This is what I get:

    Redirection Status
    The URL was redirected to http://blogsy.info/wp-admin/. Please click the link to go there.

    You can enable the automatic redirection in the settings.

    I forgot to mention before I did restart my computer and closed my open browsers and it doesn't work.

  8. andrea_r
    Moderator
    Posted 17 years ago #

    Something's wrong with your setiup / install /htacces / DNS records / virtual hosts settings / any/all of those things.

  9. kosir
    Member
    Posted 17 years ago #

    Hello thanks for a quick reply. I contacted my hosting support and also gave them all login infos so they could check it on there own. Here is what they answered:

    First mail
    We do not have a limit set on internal redirects. If you would like us to take a look at this issue, please provide us with instructions on how to replicate the problem.

    Seccon mail
    This is a problem with the script, not the server. Once your click the login button, it send you into an infinite redirect loop.

    I really have no clue what could be problem since I didn't do anything else but logout and login with a different user.

  10. demonicume
    Member
    Posted 17 years ago #

    Kosir, do an in-depth forum check. i swear i had this same issue when i first installed MU. i found the fix didnt keep track of my changes.
    hey start here http://mu.wordpress.org/forums/topic.php?id=906&replies=13

    then work from there. i posted the same question a few months ago. i remember clearing my cache (in firefox shift+control+delete) and changing a file.

    i wish i could be of more help.

  11. zappoman
    Member
    Posted 17 years ago #

    This infinite redirect might happen in cases where you are running on a different port than port 80. For more details you can see this thread here...

    http://mu.wordpress.org/forums/topic.php?id=3064

    The solution is to not run on port 80.

    I don't see you mentioning the port you are running on, so I would assume it was port 80, but maybe if your host is doing some strange port remapping, then it could theoretically cause this problem as well.

    Good luck.

  12. kosir
    Member
    Posted 17 years ago #

    Thank you guys for all your help I'll try check this out and let you all know how it went.

  13. kosir
    Member
    Posted 17 years ago #

    I searched and search and search but wasn't able to find a solution to this problem. I contact my hosting support and they told me HTTPD is running on port 80 as is normal.

    Anyway I got around the problem by mistake. While searching for a solution for my problem I found a post "How to get a login on the front page - a la iblogs.com (http://mu.wordpress.org/forums/topic.php?id=579&page=2&replies=49) and thought well this would looks nice after I fix the problem I have. So my search went on and after some time I got tired of searching and I took a break (from searching) and tried the front page login. Of course it didn't work all it did was it redirected me to wp-login.php where nothing loaded only a blank page showed up but at least there were no error :). I noticed that now I am actually logged in and can access wp-admin. So I modified the code from above mentioned post a bit to get this:

    <form name="loginform" id="loginform" action="wp-login.php" method="post">
    <label><?php _e('Username:') ?>
    <input type="text" name="log" id="log" value="<?php echo wp_specialchars(stripslashes($user_login), 1); ?>" size="20" tabindex="1" /></label>
    <label><?php _e('Password:') ?>
    <input type="password" name="pwd" id="pwd" value="" size="20" tabindex="2" /></label>
    <label><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="3" />
    <?php _e('Remember me'); ?></label>
    <p class="submit">
    <input type="submit" name="submit" id="submit" value="<?php _e('Login'); ?>" tabindex="4" />

    And it works. Now I only need to make so when a user click on "sign out" in admin panel it will take him to the main page and not wp-login.php.

    A simple solution would be to just remove everything from wp-login.php and use a meta redirect to redirect to main page. Is wp-login needed for anything else?

    Since I am not very good with codes can anyone else figure out what needs to be done to wp-login.php to start working.

  14. zappoman
    Member
    Posted 17 years ago #

    Wow, it really sounds like something must be broken with .htaccess on your setup. You might want to look into this more. If you don't have control over this file at your host, then you might want to reconsider your hosting choice.

  15. kosir
    Member
    Posted 17 years ago #

    Thanks I have full control over everything I have a reseller(WHM and cpanel) account and a very helpful support team that works 24/7. The problem is my knowledge :)

    Anyway If any wanna look this is my .htaccess

    php_flag register_globals 0
    php_flag display_errors 0
    RewriteEngine On
    RewriteBase /

    # Rewrite http://www.domain.com to domain.com
    RewriteCond %{HTTP_HOST} ^www\.(.*)
    RewriteRule ^(.*) http://%1/$1 [R,L]

    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule . - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

  16. marksw
    Member
    Posted 17 years ago #

    Hi everyone,

    I've noticed this error too now!

    I have two account: 'admin' and 'mark'. 'mark' has a blog at http://mark.example.com, and 'admin' runs the blog at http://example.com.

    'admin' can log in anywhere, but 'mark' can only log in at http://mark.example.com/wp-login.php. If 'mark' tries to login at http://example.com/wp-login.php you get stuck in this infinite redirect loop.

    Please please please can someone help me out here!? It seems like lots of people have had this problem, so someone must know what the answer is.

    Thanks!

  17. marksw
    Member
    Posted 17 years ago #

    Here is an example of what happens, when the user 'mark' tries to login at http://example.com/wp-login.php. Remember that 'mark's' actual blog is at http://mark.example.com/, but he's trying to login at the top level site.

    1. DO THE LOGIN

    POST /wp-login.php HTTP/1.1
    Host: example.com
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    Accept-Language: en-gb,en;q=0.5
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive
    Referer: http://example.com/wp-login.php
    Content-Type: application/x-www-form-urlencoded
    Content-Length: 69
    log=mark&pwd=xxxxxxxxxx&wp-submit=Login+%C2%BB&redirect_to=wp-admin%2F
    
    HTTP/1.x 302 Moved Temporarily
    Date: Sat, 21 Apr 2007 18:24:47 GMT
    Server: Apache/2.0.54 (Fedora)
    X-Powered-By: PHP/5.0.4
    X-totalblogs: 2
    X-rootblog: http://example.com/
    X-created-on: 2007-04-20 20:23:35
    Expires: Wed, 11 Jan 1984 05:00:00 GMT
    Last-Modified: Sat, 21 Apr 2007 18:24:47 GMT
    Cache-Control: no-cache, must-revalidate, max-age=0
    Pragma: no-cache
    Set-Cookie: wordpressuser=mark; path=/; domain=.example.com
    Set-Cookie: wordpresspass=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx; path=/; domain=.example.com
    Location: http://example.com/wp-admin/profile.php
    Content-Length: 0
    Connection: close
    Content-Type: text/html; charset=UTF-8

    2. FOLLOW THAT FIRST REDIRECT

    GET /wp-admin/profile.php HTTP/1.1
    Host: example.com
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    Accept-Language: en-gb,en;q=0.5
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive
    Referer: http://example.com/wp-login.php
    Cookie: wordpressuser=mark; wordpresspass=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    If-Modified-Since: Sat, 21 Apr 2007 18:22:54 GMT
    
    HTTP/1.x 302 Found
    Date: Sat, 21 Apr 2007 18:24:47 GMT
    Server: Apache/2.0.54 (Fedora)
    X-Powered-By: PHP/5.0.4
    X-totalblogs: 2
    X-rootblog: http://example.com/
    X-created-on: 2007-04-20 20:23:35
    Expires: Wed, 11 Jan 1984 05:00:00 GMT
    Last-Modified: Sat, 21 Apr 2007 18:24:48 GMT
    Cache-Control: no-cache, must-revalidate, max-age=0
    Pragma: no-cache
    Location: http://example.com/wp-admin/
    Content-Length: 0
    Connection: close
    Content-Type: text/html

    3. FOLLOW SECOND REDIRECT

    GET /wp-admin/ HTTP/1.1
    Host: example.com
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    Accept-Language: en-gb,en;q=0.5
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive
    Referer: http://example.com/wp-login.php
    Cookie: wordpressuser=mark; wordpresspass=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    
    HTTP/1.x 302 Found
    Date: Sat, 21 Apr 2007 18:24:48 GMT
    Server: Apache/2.0.54 (Fedora)
    X-Powered-By: PHP/5.0.4
    X-totalblogs: 2
    X-rootblog: http://example.com/
    X-created-on: 2007-04-20 20:23:35
    Expires: Wed, 11 Jan 1984 05:00:00 GMT
    Last-Modified: Sat, 21 Apr 2007 18:24:48 GMT
    Cache-Control: no-cache, must-revalidate, max-age=0
    Pragma: no-cache
    Location: http://example.com/wp-admin/
    Content-Length: 0
    Connection: close
    Content-Type: text/html

    4. NOW WE'RE STUCK....

    The last request/responses are repeated until my browser gives up...

    Any ideas?

  18. marksw
    Member
    Posted 17 years ago #

    Getting stranger. I've created a few more users: one with no blogs, one with one blog, and one with two blogs.

    All were created at http://example.com/wp-signup.php.

    All of the new users can login fine, but the old user still cannot.

    I can't see any difference in any of the users in the user table:

    mysql> select id,user_login,user_registered, user_status, spam, deleted from wp_users;
    +----+------------+---------------------+-------------+------+---------+
    | id | user_login | user_registered     | user_status | spam | deleted |
    +----+------------+---------------------+-------------+------+---------+
    |  1 | admin      | 2007-04-20 19:23:35 |           0 |    0 |       0 |
    |  7 | marksw3    | 2007-04-21 18:58:15 |           0 |    0 |       0 |
    |  6 | marksw     | 2007-04-20 21:23:08 |           0 |    0 |       0 |
    |  5 | mark       | 2007-04-20 21:19:56 |           0 |    0 |       0 |
    |  8 | marksw4    | 2007-04-21 19:03:18 |           0 |    0 |       0 |
    +----+------------+---------------------+-------------+------+---------+
    

    Hoping this may help shed some light...

  19. zappoman
    Member
    Posted 17 years ago #

    It sounds to me like the redirect loops you're seeing are related to how MU will send a user to their dashboard after they login. Users without blogs will be sent to the main dashboard at example.com; but without admin privileges they just see their profile info. So that's the difference.

    Admin of course, will also be sent to the main dashboard at example.com.

    So, the only difference is that MU should be trying to send your mark user to mark.example.com/wp-admin. Although I'm unclear from the redirect trace that you sent, it doesn't look like that's happening.

    Can you just access mark.example.com WITHOUT logging in? It almost sounds like your vhosts is messed up... but that would cause all kinds of other problems.

  20. marksw
    Member
    Posted 17 years ago #

    Hey zappoman, it's odd, isn't it?!

    Yep, you can get to mark.example.com - logged in or not. The vhost settings seem fine too. As you say, all sort of things would be going wrong if the apache config was broken. For DNS I had to tweak my hosts file as the DNS isn't set up yet, but all hosts are in there correctly.

  21. zappoman
    Member
    Posted 17 years ago #

    Well, I think you need to figure out where the redirects are coming from...

    wordpress has a couple places in the code where it will do redirects. The good news is that most of them go through wp_redirect(). So if wordpress is doing a redirect, then you could add some debug/logging code in there and maybe findout why it's being called.

    In a few places the code will do something like this...


    if( $current_blog->domain != $current_site->domain ) {
    header( "Location: http://" . $current_site->domain . $_SERVER['REQUEST_URI'] );
    die();
    }

    Which will also sort of do a redirect, so it could be code like that that is causing your problem.

    I don't have any idea what is happening, but if I had this problem, I'd try debugging in this general area.

    Good Luck.

  22. devilsavocado
    Member
    Posted 16 years ago #

    I am having this problem as well- I can access every blog I have made, but I can't login with the new user names on the root folder- it must be within their blog subdirectory. otherwise that infinite loop error would occur.

    I noticed that once that happened and I went back, the user would actually be logged in.

    my fix was to add these users as subscribers to the root blog, but there should be an easier way, especially if this were to be used on a larger scale.

    I notice this post comes up occasionally but I don't see many fixes for it. is this something most people don't encounter?

  23. shacker
    Member
    Posted 16 years ago #

    I found that this error was caused by misunderstanding a field in the installation/setup screen. Where it asks for the "Shortest possible URL to your server" I had entered domain.edu/blogs , whereas it apparently just wanted domain.edu.

    Dropping the tables and starting the install over fixed the problem.

  24. Giraffian
    Member
    Posted 16 years ago #

    I have exactly the same problem - the redirect issue is caused when you have a new user and you make a blog later. Its extremely easy to consistently replicate this bug.

    Tonnes of hits to the problem on these forums, no hits to a fix ... it needs to go to the dashboard for the user's first blog and for some reason it just doesn't if the user and blog were made at different times.

  25. Konstan
    Member
    Posted 16 years ago #

    I have 1 user who has reported this. He cant login using my site's link, but he can get into the admin panel typing the whole url. Its weird.

    He cant login using wp-login.php but can get into /user/wp-admin/

  26. DragonFlyEye
    Member
    Posted 16 years ago #

    Count me among those having this same problem. Here's what's going on, exactly:

    The original root-admin account - and only the only the original admin - can login wherever it pleases. No one else can login anywhere without getting the redirection loop. However, the system *is* logging them in, because now the home page shows "site admin" instead of "login."

    However, if you click on the "site admin" link, it still goes into that loop. I presume this is because something in the system checks the validity of the login. I even tried changing the hidden "redirect-to" field in the logon script to "index.php," which worked inasmuch as logging in brought you to the home page instead of the loop. However, the loop still happened when clicking the "site admin" link.

    This sure seems like the kind of thing some one would want to work out a permanent solution for and put it into the trunk. I'm also very disappointed by the fact that so many people have this issue, yet there is no "Known Issues" page available to first-time visitors of the mu.wordpress.org website. There is also nothing in the README file warning of this potential eventuality.

    What is even more odd, and not the first time I've noticed such inconsistency, is that I have another MU installation on the same package with my host which is working with none of these issues.

  27. DragonFlyEye
    Member
    Posted 16 years ago #

    UPDATE: For the benefit of others who might be looking fruitlessly for a solution to this problem. Looks like someone has submitted a Trac issue for this. The issue appears to only affect users who were created without a blog, then had a blog added to their accounts later.

  28. moorezilla
    Member
    Posted 16 years ago #

    I think my problem may be related to this, only on the subdirectory side of things. I have made a trac ticket for it as well, so I'm hoping this will be addressed in a future release.

    Quick recap:

    I recently upgraded to mu 1.2.5a from 1.2.4 and now I have a problem that may be a bug. My overall site admin account works fine, but all other users cannot login from "/sites/wp-login.php". They can only login from "/sites/username/wp-login.php".

    If they try to login from "/sites/wp-login.php" they get redirected to "/sites/wp-admin/profile.php" and the page fires a "You do not have sufficient permissions to access this page" warning.

    I run ubuntu feisty, php5.x, apache2.x, and mysql5.x and I've never had this problem before upgrading to mu 1.2.5a. My mu uses subdirectories rather than subdomains.

    Similar issues are mentioned in the forums, but there doesn't seem to be an available fix.

  29. andrea_r
    Moderator
    Posted 16 years ago #

    Since there are multiple threads on the issue, we can conclude it's a bug.

  30. dottavi
    Member
    Posted 15 years ago #

    the conclusion of andrea_r is pure poetry. I'll save it as a tagline :)

    now the problem - er, actually, *my* problem - is that it's happening again with a fresh installation of WPMU 2.6.1

    does anybody got a final answer about error 310 (net::ERR_TOO_MANY_REDIRECTS)???

    thnx in any case

About this Topic

  • Started 17 years ago by cburell
  • Latest reply from tonydbaker