Viewing 6 replies - 1 through 6 (of 6 total)
  • Check the .htaccess file and see if any redirects are there.

    Thread Starter zapdaddy

    (@zapdaddy)

    Ok If I go to Public_html -> htacess
    this is what I see:

    RewriteOptions inherit

    # -FrontPage-
    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
    <Limit GET POST>
    order deny,allow
    deny from all
    allow from all
    </Limit>
    <Limit PUT DELETE>
    order deny,allow
    deny from all
    </Limit>
    AuthName xxxxxxxxx
    AuthUserFile /home/xxxxxx/public_html/_vti_pvt/service.pwd
    AuthGroupFile /home/xxxxxx/public_html/_vti_pvt/service.grp

    # BEGIN WordPress

    # END WordPress

    <Files ~ “^wp-login.php”>
    Order deny,allow
    Deny from all

    Allow from 154.20.224.185
    </Files>

    Anything in there causing the problem?

    Thank you kmessinger for your advice. Its very much appreciated to get some help with this frustration issue.

    Can you please post your url?

    Make a copy of your current htaccess file. Then try this

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    If that does not work please restore your original htaccess file.

    Thread Starter zapdaddy

    (@zapdaddy)

    I changed the htaccess like advised and it completly shut off all access to the sites so I restored it to the original.

    Using some trial and error I completely removed
    `<Files ~ “^wp-login.php”>
    Order deny,allow
    Deny from all

    Allow from 154.20.224.185
    </Files> `

    with the code editor and now I have complete access to all the WP Dashboards again!

    Thank You again to kmessinger! Hopefully this will help someone else in the future

    Using some trial and error

    That’s the way to go sometimes. Glad you are back.

    The FILES directive was placed as an attempt to protect the blog from Brute Force Dictionary Attacks (which since April 2013 have been increasing across the Web thanks to a new botnet).

    The standard advice I have found on Websites is to place a “deny from all” inside the FILES block directive and this works fine.

    However, when you try to “white list” any IP address (so that people can log in to their own dashboards) Apache gets stuck in a redirect loop for any DENIED addresses (trying to access the WP-LOGIN.PHP script).

    I have found many discussions on technical fora where people into this problem and asked for help but could not find a resolution.

    As best I can determine the issue has something to do with how WordPress needs to rewrite URLs.

    I run into the same problem on both single installations and multisite installations.

    I don’t think the redirect loops are harming anything, except that hundreds or thousands of compromised servers and individual PCs could be attacking a site at any given moment, and the servers might crash from all the concurrent redirect loops.

    If anyone knows how to get around this problem, please share.

    Otherwise, you have three choices:

    1) Live with the BFD attacks, knowing they’ll eventually get in.
    2) Live with the redirect loops and hope your shared hosting can take the load
    3) Just use “deny from all” and temporarily enable the WP-LOGIN.PHP when you need to get into the dashboard (setting a cookie should allow you to bypass this check for a while)

    I have not tried renaming WP-LOGIN.PHP as I don’t know how many scripts would have to be changed.

    There is at least on RENAME WP-LOGIN plugin available here on WordPress.Org. I may try that on a couple of sites and see if that helps.

    ON EDIT: On some installations I still get the infinite redirects even with just “deny from all” in the FILES section. It may be due to different versions of Apache running on different servers. I don’t know and don’t have time to start logging htaccess executions.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Too many redirects’ is closed to new replies.