WordPress.org

Support

Support » Plugins and Hacks » BulletProof Security » [Resolved] Request exceeded the limit of 10 internal redirects

[Resolved] Request exceeded the limit of 10 internal redirects

Viewing 15 replies - 1 through 15 (of 22 total)
  • Plugin Author AITpro

    @aitpro

    Wow awesome documentation.!

    This code below only works if the redirect status is 200 OK. You can use other status codes instead of 200, but would not work if you used 403 for the redirect status for this reason – The ErrorDocument directive already has a redirect status of 403 so using {ENV:REDIRECT_STATUS} 403 would not stop an infinite 403 loop. Since you are seeing 500 errors maybe using {ENV:REDIRECT_STATUS} 500 would work, but a 500 error is an Internal Server Error so this means your Server could not process the Request at all so my guess is that the code would not work, but it might.

    # .htaccess Fix for Infinite Loops
    RewriteEngine On
    RewriteCond %{ENV:REDIRECT_STATUS} 200
    RewriteRule .* - [L]

    Have you done these BPS troubleshooting steps to confirm that a BPS security filter is causing this issue? If

    1. Make a backup of your .htaccess files using BulletProof Security built-in Backup.
    2. Activate Default Mode on the Security Modes page.
    3. Use the Delete wp-admin .htaccess feature on the Security Modes page.
    4. Test your plugin or theme.
    5. Restore your .htaccess files using BulletProof Security built-in Restore.

    Also this part of the error below does not show an image file name at the end of the URL. This may or may not be normal, but logically you would think that the URL would also contain the image file name too in the URL.

    /2011/05/my-soundcloud/akai-lpk25-lpd8/

    If the infinite loop stops after doing the troubleshooting steps above then try commenting out the BPS root .htaccess security filters one by one to find the security filter that is causing this. Also it may be that you cannot use the ErrorDocument directive on your Server/Host. it appears that this is the case for some folks. So maybe try turning off Error Logging first before doing anything else.

    As I posted in my original post I tried that code from the bps website for generic loops

    # .htaccess Fix for Infinite Loops
    RewriteEngine On
    RewriteCond %{ENV:REDIRECT_STATUS} 200
    RewriteRule .* - [L]

    it doesn’t work in my situation. when someone views a “preview” page from an image search engine.

    the error only occurs from an image search engine’s Preview window

    for example if you manually go to the image that causes the error on yahoo link in my first post it works fine.

    here is the page the image is located: http://www.dude-suit.net/2011/05/my-soundcloud/akai-lpk25-lpd8/

    And here is direct link to image: http://www.dude-suit.net/wp-content/uploads/akai-lpk25-lpd8.jpg

    so it works manually, I have no trouble with anything other than image search engines causing the loop

    the loop is caused by their preview window. if you go to images.google.com or any of the image search engines in my first post and type a generic query such as dog

    now click the first image you see, you will be shown the image, then a chance to “preview the webpage the image came from”

    that preview is causing my loop problem and the problem goes away if I turn off BPS.

    I only have 3 plugins and none dealing with html, 1 plugin is on top right showing how many listeners on my streaming radio server. then I run tinymce post editor and the add bar for digg/reddit/facebook/etc.

    somehow the image search engine preview window is causing the loop and I can’t figure out which rewrite is causing it as I the rewrite rules look like a foreign language to me hehe.

    it’s just image search engine preview windows causing the loop
    but i dont know how to stop it. I’ve set log level to debug and restarted apache but it didn’t give any new info. same error message as in the first post.

    and I dont want to turn error messages off, as I like to keep an eye if someone tries to hack the server and I can firewall them or see what caused the error if I have a 404 or something.

    btw I added rewritelog to my apache.conf

    here is the error log from yahoo image search test

    Link that causes error:
    Link

    Or go to http://images.search.yahoo.com
    do a search for Akai LPK25 dude and click the image for dude-suit.net
    it will show the image but the preview will throw ERROR 500

    now look in the rewrite log file, that is what happens when an image search tries to preview my site from an image search engine with BPS turned on.

    seeing the direct info in rewrite log is there anything I can do to fix the code so image search engines will work with bps?

    Rewrite.log
    http://cito.allmysh-t.com/rewritelog.txt

    Plugin Author AITpro

    @aitpro

    As I posted in my original post I tried that code from the bps website for generic loops

    that code ONLY works if the redirect status is 200. You are experiencing 403 and 500 status errors so a 200 status does not apply / would have no effect.

    I will look into the preview thing in a bit and see if i can see anything unusual.

    Plugin Author AITpro

    @aitpro

    When i check the images files on yahoo images they are displayed to me correctly and i do not see a 500 error.

    Plugin Author AITpro

    @aitpro

    I don’t see a problem at this point. The rewrite log is for another site. is this one of your other sites?

    Plugin Author AITpro

    @aitpro

    And the RewriteLog actually does not show any problems. What i see are standard things like processing the htaccess code is being logged, but there is no indication that something is not working correctly.

    What i assume is happening is something similar that happens with the facebook bot script that retrieves image files. Something about the Header request part of the image retrieval in the script itself has a problem and not the actual image retrieval itself.

    Plugin Author AITpro

    @aitpro

    hmm i did just notice something. on the bottom portion of the yahoo images page it grabs your entire website and shows your website itself. I am assuming this would have something to do with an iframe so maybe the security rules pertaining to iframes would have something to do with this. what is odd is that the error goes away after a few seconds and your site does display.???

    Plugin Author AITpro

    @aitpro

    too funny this was occuring on another website not yours. it appears that your website is not displayed in the frame preview so what i recommend that you do is comment out the root .htaccess security filters 1 by 1 until you find out which one is causing this issue.

    Plugin Author AITpro

    @aitpro

    I checked my site with yahoo images and I don’t see any problems. I will keep looking at this, but so far i don’t see any problems yet. unless something is not happening that is supposed to happen. 😉

    Plugin Author AITpro

    @aitpro

    oh wait now is see this. what is interesting is that the image retreival works fine so maybe BPS is blocking yahoo from grabbing my site in a preview which is actually something that i prefer. Now that i know what to look for i will be able to give you some sort of answer. Personally i like that my site is not being grabbed. 😉

    Forbidden

    You don’t have permission to access /aitpro-blog/297/bulletproof-security-plugin-support/bulletproof-security-wordpress-plugin-support/ on this server.

    Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

    Plugin Author AITpro

    @aitpro

    interesting. When i grab the yahoo images source code and create a page under my XAMPP installation the preview of my site does display. hmm.

    Plugin Author AITpro

    @aitpro

    When i put BPS in Default mode on a test subdirectory site, my main site/root site displays, but not the correct subdirectory site where the image is actually located. hmm. so obviously the yahoo images script is parsing the URLs and not using direct linking.

    So what then happens is a 404 error Page Not Found since Yahoo is looking in the wrong place for the image file. hmmm

    if you manually go to the url from the image search engine it works but the redirect doesnt.

    so yahoo image search gives an error 500

    http://image.dude-suit.net/albums/userpics/10002/imagesearcherror.PNG

    when that error pops up the spam in rewritelog is what happens on my site.

    I only run 1 site http://www.dude-suit.net that rewrite log is for my site.

    I saw on google how to turn rewrite log on to see what’s happening

    thats the SPAM in rewrite log when I refresh yahoo images.

    as you can see Yahoo image preview as well as bing and google image previews give error 500.

    but i get internal loop errors in apache error log

    and of course that is the spam of content in rewrite log that occurs when I click refresh on yahoo images

    tons of 403’s and such

    http://cito.allmysh-t.com/rewritelog.txt

    you can see the loop in my log file there.

    that is a file hosting site, I stored the rewritelog text file for dude-suit.net over on the filehost site.

    that rewrite log is from dude-suit

    everytime I refresh yahoo images this loop happens http://cito.allmysh-t.com/rewritelog.txt

    I can see the loop error in the log from BPS

    see in that log each loop is numbered, the pattern provided is causing a loop from image search engine previews.

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘[Resolved] Request exceeded the limit of 10 internal redirects’ is closed to new replies.
Skip to toolbar