[users@httpd] Looking for a Favicon/Robots Solution

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

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

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: laffey.tv)

  RewriteEngine On
  RewriteCond  %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
  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: justin@xxxxxxxxxxx --
-----------------------------






---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux