Weedpacket wrote:That's exactly the point: the original poster wants to redirect the spider so that it crawls a different page from what it requested. As Kudose pointed out, this sort of carry-on is the sort of behaviour that gets sites blacklisted by search engines.
Hello Weedpacket,
This is not my month. I still don't understand your point.
I think it's not so much that the poster wants to redirect the spider, it's more likely that the page developer wants to redirect to another browser page under certain conditions. That's why output buffering is usually used in php, because any header function call on an HTML page has to be issued before any html code is sent out.
That certainly is not bad behavior, and has not resulted in any search engine blacklisting on the dozens of sites that I've written that employ these techniques.
The problem that I see in this is that if a spider picked a page from some seed list, and that page had a php location header function reference in it, the spider would never see the page at all if the conditions for executing the header call were present. If the conditions were not met, the spider would not be redirected and the page would be available for its scan.
However, if the page was constructed to do this same kind of redirection using client side Javascript for example, the spider would see all the text and links that it was intended to look at. Since it cannot understand Javascript, it would simply not look at the redirection code.
So if redirection is not a programming sin, I guess the problem is in the way php handles it (at least from the spiders viewpoint).