> -----Original Message-----
> From: Justin Gehring [mailto:[EMAIL PROTECTED]
> Sent: Montag, 9. Mai 2005 05:41
> To: users@httpd.apache.org
> Subject: [EMAIL PROTECTED] Looking for a Favicon/Robots Solution
> 
> 
> 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. 

Exactly. The request is assigned to a particular VH based on it's TCP/IP and 
HTTP header attributes. Thereafter, the only directives which apply to it are 
those inside the VH container or those "outside" which have "server" context 
(see
http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Context ).

You need to put the rule in every VH...

> I'm curios
> if anyone knows a way around this. 

... unless you can specify it globally using mass virtual hosting
(http://httpd.apache.org/docs-2.0/vhosts/mass.html ).

Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored. 

> If not, can anyone recommend any
> documentation the apache stuff for writing custom mod's?
> 
> -----------------------------
> --     Justin Gehring      --
> --   PH: 651 - 208 -8797   --
> --  EM: [EMAIL PROTECTED] --
> -----------------------------
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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: [EMAIL PROTECTED]
>    "   from the digest: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
Diese E-mail ist eine private und persönliche Kommunikation. Sie hat keinen 
Bezug zur Börsen- bzw. Geschäftstätigkeit der SWX Gruppe. This e-mail is of a 
private and personal nature. It is not related to the exchange or business 
activities of the SWX Group. Le présent e-mail est un message privé et 
personnel, sans rapport avec l'activité boursière du Groupe SWX.
 
 
This message is for the named person's use only. It may contain confidential, 
proprietary or legally privileged information. No confidentiality or privilege 
is waived or lost by any mistransmission. If you receive this message in error, 
please notify the sender urgently and then immediately delete the message and 
any copies of it from your system. Please also immediately destroy any 
hardcopies of the message. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the intended 
recipient. The sender's company reserves the right to monitor all e-mail 
communications through their networks. Any views expressed in this message are 
those of the individual sender, except where the message states otherwise and 
the sender is authorised to state them to be the views of the sender's company.

---------------------------------------------------------------------
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: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to