Our error log is flooded with file not found requests for __utm.gif.
This
is part of google analytics and for some reason, the requested pages
(some)
are trying to load it locally.
I have yet to figure this problem out in terms of the “why” but for now,
I
want to remove it from my error log.
2 options:
Put a copy of the file in our root directory which will quiet down
the
error log or
Redirect requests to the file via nginx configuration file, something
like this:
These requests could be from crawlers. A couple ways to tell: (1) are
the requests from just a few IPs, or from lots of different IPs? And
(2) do the requests contain all the query string parameters that are
sent to Google Analytics?
I run several sites, all of which use Google Analytics, but I’ve never
seen this particular request in the logs. I have seen some others of
unused assets that crawlers found in various JavaScript or CSS files.
Some crawlers seem to scrape all referenced files for something that
looks like a URL and then attempt to access it. I even get requests
for “http://tel:/18002345678” from mobile site pages where I have
links like 1-800-234-5678. The crawler
doesn’t understand, but makes the request anyway.
I would definitely figure out why this is happening first, but to
answer your question, this should do what you need:
Also note that I haven’t tested these, but I don’t see why they
wouldn’t work. However, that being said, I don’t know how well
browsers respect redirects for image requests.
Thank you so much for the detailed response as well as suggested nginx
configuration, I will try it.
There’s no question that this is a problem with something somewhere and
I
will need to figure out what. Right now I don’t have the bandwidth and
b/c
its clogging up the error log file, I want to clear that up and move on.
I don’t think that its happening due to crawlers as the pages that are
coming up in the log file (referring page) are many and there is no
pattern. I’ve checked many of the referring IP addresses and they are
valid
users of our service.
On Thu, Sep 10, 2009 at 07:27:39PM -0500, Nick P. wrote:
for “http://tel:/18002345678” from mobile site pages where I have
links like 1-800-234-5678. The crawler
doesn’t understand, but makes the request anyway.
I would definitely figure out why this is happening first, but to
answer your question, this should do what you need: