views:

373

answers:

2

I'm crawling a website using php. As I don't know much about turning php into a CGI and runing from command line the method I've chosen is, after one succesful iteration, to redirect back to the same php file so it runs again (it's not an infinite loop as I use both a cookie and a timestamp check to make sure it ends within a set time or after a few hundred iterations).

The problem I keep getting is that after 20 iterations or so I get the following error message:

Redirect Loop

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

How can I stop apache/php (I'm using xampp on my localhost) from preventing me from looping as long as i want.

A: 

As far as I can tell, this is created by the browser, not the server. You can't disable client-side code to prevent redirect loops.

MiffTheFox
yep - changing redirection-limit in firefox's about:config does the trick
wheresrhys
A: 

As far as I know, this happens if you try to redirect to a page which redirects again and so on.

Each brwoser has a Limit, with firefox you can set it in the about:config, but the other browsers don't have that kind of option.

Dennis