Skip to:

Infinite Loops on posts and profiles with IIS

  • Hi there,

    I’ve been using bbpress for a while but I recently updated my servers and switched all the sites over to it. Much to my frustration I am experiencing infinite loops when attempting to edit or view any profiles or topics. Thus making a rather rubbish forum!

    Admin pages work fine, WP integration went through perfectly, topics can be posted BUT not viewed.

    Right so heres the spec:

    Windows Server 2008


    PHP 5.2.6

    MySQL 5.1.25

    Both the latest versions of WP and BBpress, WP is installed absolutely fine.

    With debug activated I get the following:

    REQUEST_URI: string(31) “/journal/messageboard/topic.php”

    should be: string(37) “/journal/messageboard/topic.php?id=39”

    full permalink: string(64) “”


    If anyone can help me out I would actually love them a great, great deal…..

    I found this thread, which is quite old:

    But the fixes suggested there are in the settings file already.

    Help would be appreciated and thanks in advance


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

  • chrishajer


    Can you post a link to your forum so we can see what’s happening?

    I don’t suppose anyone has had a chance to check that link? I might have to take the forum down on it soon as I’m concerned about a infinite loop being live on the server.

    I’ve been researching and can’t seem to find a solution to this….

    It just seems odd as on IIS6 Bbpress worked fine…..



    I don’t get an infinite loop, but everything I clicked on in the message board resulted in a 404 error. Did you change something?

    Ha, yeah I switched it over to make it stop looping to save bandwidth….Just before you messaged rather typically….

    I will set it going now and will leave it live for the day.

    If someone could have a look that would be awesome.




    Wow, that most certainly is a problem.

    Two thoughts.

    1. If I disable “meta redirects” in FF with the web developer toolbar, it does not keep redirecting, it just dies. Are you trying to redirect people from the bbPress profile page to the WordPress profile page, and somehow that is typed wrong? Like in journal/messageboard/profile.php there is a redirect that sends the browser to WordPress journal/wp-admin/profile.php and it’s not working for some reason?

    2. There is some weird test cookie stuff being sent, although I doubt it has any effect on this problem. Never know though.



    I suspect it’s something with a refresh bouncing the user back and forth.

    Well the plot thickens…..

    I had a look at your suggestions and there doesn’t appear to be anything inputted wrong.

    So as an experiment I did a clean install of bbpress on my server with no mention of a WP integration and a clean database and exactly the same thing happens…..

    Any ideas what I can try to stop this? This is pretty weird….

    Is it possible to download older versions of Bbpress to test those….?



    Older versions are available. Pick your release from here:



    What is the equivalent of mod_rewrite on IIS? I mean, what makes the URLs into permalinks rather than just topic.php?id=whatever?

    Mod_rewrite doesn’t work on IIS without third party software and I think they are all a little buggy on IIS7.

    Annoying but true, so this is just using Bbpress with the normal query string setting.

    I will try an older version of bbpress later today just to see what happens.

    Oh yeah also, this problem never occurred on server 2003 which has what flummoxed me about this….



    But it *isn’t* just using the normal query strings, I don’t think. They looked like permalinks to me. Did you set the permalinks to true or slugs?

    Here are some URLs I saw yesterday:

    Those look like permalinks to me. I think they all gave a 404 error. You said you “switched it over” earlier, to keep it from looping. What did you mean by that?

    Hi Chris,

    Appreciating your continued interest in this.

    By “switched it over” I meant on the setting for Pretty permalink type:

    The normal way to get this working in IIS is ‘none’ as it doesn’t like url rewrites, so when I switched it over I meant I temporarily turned the setting to ‘Name based’ purely to stop visitors setting the forum into an infinite loop and using a ton of bandwidth as this goes straight to a 404 page not a loop

    So the loop occurs when the permalinks are set to ‘None” as can be seen here:

    That is the query string format that normally works in IIS.

    As for setting the permalinks to true or slugs specifically I’m not sure how to do that.

    But I am not using the pretty permalinks normally, I only had it set to that when you visited yesterday so that my bandwidth wasn’t wasted.

    That make sense?

    Hope so…..

    So if you visit right now:

    It is set as it should be, complete with loops on topics….



    I see :-) So you turn on permalinks to prevent people from viewing anything and putting their request into an infinite loop. Got it.

    I see now that it’s still broken. Are you sure there is nothing causing a meta redirect? The only thing that stops the looping for me is to disable meta redirects in my browser. Other than that, it loops forever.

    Yeah I’ve tried what you’ve tried there with the re-directs and yep, it just dies.

    But no meta-redirects are used in my sites at all. For experimentation I tried the domain with two different domain bindings, multiple domain bindings. But no difference.

    I tried an older version of bbpress, same problem. I installed bbpress fresh into a different domain, same problem.

    I noticed this guy here had a similar prob a while back:

    Forum and topic pages redirects to page 1

    But never said how he solved it, I might join up to his forum and ask him….

    But yes this is driving me crazy…on a plus note when I finally fix it I can fresh install bbpress in about two minutes ;-)

    Any other suggestions from folk greatly appreciated. And thanks for ongoing help Chris.



    How about IIS access logs or error logs?



    I’m taking a look at this now for what it’s worth.

    Not sure if I’ll be able to help but let’s see.

    IIS is sending a refresh header:

    Refresh 0;url=

    content length is zero, so nothing is being sent

    Apparently IIS returns “request_uri” differently than other servers. I suspect it’s a similar problem to what they went through with drupal here:

    Unfortunately it’s way over my head to fix. I suspect it will take someone like MDA to fix it.



    I have a crazy idea to try to “fake out” bbPress and make it think request_uri actually exists on the IIS server so it doesn’t try to (incorrectly) calculate it itself.

    Try saving and installing this as a plugin with a leading underscore, ie. _IIS-fix.php

    Plugin Name: IIS request_uri fix
    if (isset($_SERVER['HTTP_REQUEST_URI'])){

    no activation required, should auto-activate – just delete if it causes problems

    You sir, are an absolute GENIUS!

    It works!

    I cannot thank you enough, thanks very much.

    Just to confirm that this is only need for IIS7 as IIS6 works just fine with Bbpress.

    Seriously, thank you _ck_ I owe you a drink or something!




    Awesome _ck_ – thank you.

Viewing 20 replies - 1 through 20 (of 20 total)
  • You must be logged in to reply to this topic.
Skip to toolbar