si-blog

Redirection limit for this URL exceeded

Posted Apr 24, 2005 in Browsers.

Within the last few days, I've been getting the following recurring error on some of my web pages:

Redirection limit for this URL exceeded. Unable to load page requested. This may be caused by the cookies that are blocked.

The error is being generated by Firefox (my browser of choice) on some pages that include AdSense code. I noticed that it doesn't occur on any other pages, but it isn't happening on all pages with AdSense code on them. Internet Explorer 6.0 is not generating an error under those circumstances, but is instead simply not displaying the AdSense ads at all. This may or may not have something to do with the way I implement AdSense. It may also be related to my use of mod-rewrite.

I tried deleting cookies, but it didn't help. Does anyone have any ideas what might be wrong?

Comments

  1. Gravatar

    You could always load up about:config and change the "network.http.redirection-limit", but that's a bit of a workaround :)

    Posted by Porges on Apr 24, 2005.

  2. Gravatar

    Quite so. I'd rather find out what is causing the problem. The strange thing about it is that it has only started doing it recently - in the last couple of days, in fact. I was wondering if Google had changed something with AdSense. The recent Firefox update may also explain why I am getting the error message now, but not before.

    Posted by Simon Jessey on Apr 24, 2005.

  3. Gravatar

    I have noticed that with AdSense pages sometimes hang... I don't know if it is due to the AdSense code or if it is the way it is being implemented.

    It's not just your site doing it though, I've noticed it on others as well.

    Posted by Stephan Segraves on Apr 25, 2005.

  4. Gravatar

    At the moment, I'm not sure whether or not to restore the AdSense code to the offending pages. The pages still work with the error, but the error is certainly undesirable.

    Posted by Simon Jessey on Apr 25, 2005.

  5. Gravatar

    The message being discussed just happened to me. I attempted brining up the URL in IE ; it turned the link red and nothing happened. To say this is odd is an understatement. I've tried restoring (XP Home) to no avail. Virus? Spyware? Malware? Hard to say.

    Posted by Beverly Kurtin on Apr 25, 2005.

  6. Gravatar

    I would have said that it might be related to the recent update of Firefox, but the fact that IE seems affected scuppers that possibility. Since I don't use IE very often, it is hard for me to pin down exactly when the problem started occuring.

    I am fairly certain that it has something to do with my use of AdSense, but I cannot say whether or not it is something I am doing, or something Google is doing.

    Posted by Simon Jessey on Apr 26, 2005.

  7. Gravatar

    It's got nothing to do with Adsense. I'm developing some software in PHP on a FreeBSD server running Apache with no Adsense code on the page yet. I develop the first part of my two part site, copied that first section to the second section, and only changed a couple variable's values. When I try to log into the second part of the site, I get the above mentioned error in Firefox on Linux. I have not tested IE. I spent the whole day working on this thing without a problem. As soon as I make the copy and few changes (verified with 'diff'), i get that funky error.

    The error is when my page tries a <code>header ("Location: file.php"); </code> call. That's why you see the Redirect in the error phrase, because it's a redirect call.

    Please, let me know if you figure it out!

    Dave

    Posted by david on Apr 29, 2005.

  8. Gravatar

    i figured it out. In file1.php, I have a header("Location: file2.php"). File2.php has some fuzzy logic that tells it to call header("Location: file1.php"); That's where the limit is reached because of the loop! The guys on the site you're visiting must revise their code.

    Ciao

    Posted by david on Apr 29, 2005.

  9. Gravatar

    In my case, I'm bringing in a separate page, either as an <inline> frame (with IE), or as an <object> (with everything else). I get this problem on SOME pages, but not all of them. The only difference between one page and another (because they are actually the SAME page, just altered dynamically) is the ads that AdSense is serving.

    Posted by Simon Jessey on Apr 30, 2005.

  10. Gravatar

    The following URL, which points to an MSKB article of all things, does not work in Firefox 1.0.3, and causes the redirection error you've described:

    http://support.microsoft.com/support/kb/articles/Q181/8/62.ASP)

    I've been getting many instances of this same error myself in the last week, not just from Google links but many other sites as well. Coincidentally, about a week ago is when I upgraded to Firefox 1.0.3.

    In any case, the problem is SPECIFIC to Firefox, and does not happen when I load the exact same URLs in IE6 SP1. In fact, that's been my workaround for this problem until today, when the failure of this URL finally broke the camel's back and drove me to investigate. The person who claimed the error also occurs in IE is dealing with a more complex and unique problem than what Simon and I have encountered; a Google search found many complaints of the error specific to PHP site admin or some such. That's not OUR problem.

    In my own case, I have narrowed it down to two synergistic causes: Firefox (1.0.3) and a specific Proxomitron HTTP header filter. Yes, I use Proxomitron; with the state of the 'Net, can you really blame me? The specific header filter involved is this one:

    [HTTP headers]
    In = FALSE
    Out = TRUE
    Key = "URL: Un-Prefixer (Out)"
    Match = "[^/]+w[^a-z]((http|ftp)(%3A|:)(%2F|/)[^&]+)1"
    Replace = "$JUMP($UESC(1))"

    This filter has never caused me a problem at any time, in any browser, until a week ago, so this filter alone is NOT the single source of the problem; there's some sort of negative synergy at work here. Nevertheless, the filter isn't so critical that I have to have it, so I now have another workaround - in addition to simply using IE - for the error by disabling this filter.

    Nevertheless, I'll wager that ultimately it proves to be caused primarily by Firefox, specifically 1.0.3. I may test this theory myself by reinstalling 1.0.2, which I have archived.

    Posted by Mark Craig on May 08, 2005.

  11. Gravatar

    Your findings are very interesting, Mark. At first, I thought it was just a Firefox upgrade too (certainly I noticed the problem immediately after the upgrade); however, I noticed that Internet Explorer DOES have problems generating the page, with all its various components, but without any error message. Very mysterious.

    Posted by Simon Jessey on May 10, 2005.

  12. Gravatar

    I found this page because I have been running into the same error with Firefox, on both the Mac OS X platform and Win2K. I believe it is some sort of Firefox problem and I'm going to see if something has been filed in Bugzilla. (Probably, yes.)

    It's probably another case of the programmers thinking that this is a good behavior (because the offender serving is sending out lousy code) but it's really a bad behavior because it causes problems for the end user. If something is goofy, Firefox should warn the user "something is goofy", but still try to load the page anyway. Then the person with the stupidly coded site will start getting "FF said your code is goofy" emails, and the burden will be shifted where it belongs. :)

    Posted by Hypatia on May 10, 2005.

  13. Gravatar

    Lads and Ladies, HERE is the solution to these woes:

    Open up FireFox

    Tools

    Options

    Click the + next to cookies

    Click Clear

    Click Exceptions and click Remove All Sites.

    DONE!

    Posted by Dan Trenner on May 12, 2005.

  14. Gravatar

    The above solution does NOT work (for me).

    I think the answer lies in what david said way above:

    'In file1.php, I have a header("Location: file2.php"). File2.php has some fuzzy logic that tells it to call header("Location: file1.php"); That's where the limit is reached because of the loop! The guys on the site you're visiting must revise their code.'

    I also started getting this problem, simply by refreshing the page too many times. Now that page won't load in IE6 or Firefox.

    I think if I wait for the SESSION to expire at the server end the problem will go away.

    Posted by Zac on May 12, 2005.

  15. Gravatar

    I came acrose the same error in Firefox. For me it was also a redirect problem. I think if you trie to redirect more then 2 times server-side Firefox throw's you the error.

    In the case of google-adsense, maybe the .js file tries to reidrect a couple of times so that's why your getting the error.

    Matthijs
    The Netherlands

    Posted by Matthijs on May 15, 2005.