From: Rui C. <rui...@ac...> - 2004-12-08 12:31:17
|
Besides yesterday's fix, I spent quite some time figuring out why I still had another "hit" on the search pages. At first I thought it was something inside the search code, but when I started logging IP addresses it became obvious. It turned out that AdSense will trigger an _immediate_ hit from the google bot if I display ads on my *Search pages, which prompted me to include this little snippet right at the start of index.php (to waste as little resources as possible): define( "DUMB_BOTS", '/(JPluck|Mediapartners|ia_archiver|googlebot|msnbot|Crawl)/i' ); if( preg_match( DUMB_BOTS, $_SERVER['HTTP_USER_AGENT'] ) ) { if( preg_match( '/\?(s|action|version)=/', $_SERVER['REQUEST_URI'] ) ) { header( "HTTP/1.1 404 File Not Found" ); echo( "<H1>404 File Not Found</H1>" ); exit; } } On Dec 7, 2004, at 11:39 AM, Rui Carmo wrote: > Bingo. I spotted it late yesterday evening when trying to figure out > what PageType was for. My fork already had some of those lines moved > around (I added If-Modified-Since checking near those bits and return > "not modified"), but that was basically it. > > Which would definitely place my fork as > 1.3.7-plus-bits-of-other-versions-on-steroids :) > > If only it wasn't running for two years like this (sigh). Well, at > least my other optimizations work even faster now :) > > R. > > On Dec 7, 2004, at 1:33, Carsten Klapp wrote: > >>> >> >> Hi Rui, >> >> This sounds exactly like the "double transformation" bug which I >> (inadvertently introduced, and later) fixed around 1.3.7. |