httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Gehring <>
Subject [users@httpd] Looking for a Favicon/Robots Solution
Date Mon, 09 May 2005 03:41:24 GMT
Hi all,

I apologize if someone has posted on this but I did not find it searching the

I currently manage an apache webserver 1.3.33 with a large number of
virtualhosts. As you can guess, my log files are ridden with 404's about the
missing robots.txt and favicon.ico files. One obvious solution to this problem
is to put an icon and robots file into all of there root level directories, but
this takes work. Instead, I wanted to use mod_rewrite to just have all the
address's rewrite to a common favicon, in the event that there was no favicon
present (same with robots). The code looked like this (thank you:

  RewriteEngine On
  RewriteRule  .*favicon\.ico$         /var/web/favicon.ico [L]
  RewriteRule  .*robots\.txt$         /var/web/robots.txt [L]

I put that in my main server conf file thinking that it would catch all
addresses, and if it failed to find one of the files, it would spit out the
common file. This hit a glitch though, it appears that Apache sends the address
information to the virtual host before running it through the main config
(unless i have something else wrong). This means that I can't just write this
one rule once, I would have to put it into every single virtualhost. I'm curios
if anyone knows a way around this. If not, can anyone recommend any
documentation the apache stuff for writing custom mod's?

--     Justin Gehring      --
--   PH: 651 - 208 -8797   --
--  EM: --

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message