From owner-freebsd-www Tue Apr 29 15:10:59 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id PAA14191 for www-outgoing; Tue, 29 Apr 1997 15:10:59 -0700 (PDT) Received: from diablo.ppp.de (diablo.ppp.de [193.141.101.34]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id PAA14160 for ; Tue, 29 Apr 1997 15:10:48 -0700 (PDT) Received: by diablo.ppp.de (Smail3.1.28.1 #1) id m0wML6X-000QdpC; Wed, 30 Apr 97 00:10 MET DST Received: from [193.141.161.123] (monster.pong.ppp.de [193.141.161.123]) by pong.PPP.DE (8.7.5/8.6.12) with SMTP id XAA24183; Tue, 29 Apr 1997 23:48:54 +0200 (MET DST) X-Sender: stefan@pong.ppp.de Message-Id: Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Date: Tue, 29 Apr 1997 23:43:01 +0200 To: nsj@ncsu.edu, wosch@cs.tu-berlin.de (Wolfram Schneider) From: Stefan.Bethke@Hanse.DE (Stefan Bethke) Subject: Re: foobar Cc: www@freebsd.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by hub.freebsd.org id PAA14186 Sender: owner-freebsd-www@freebsd.org X-Loop: FreeBSD.org Precedence: bulk At 15:54 Uhr 29.04.1997, Nate Johnson wrote: >%The message for unknown files does not look good, e.g. >%compare http://www.freebsd.com/foobar with http://www.att.com/foobar > >Good point. > >If someone (John? Jordan?) will configure Apache's srm.conf file with the >"ErrorDocument" tags, I'm willing to generate pages to handle the more common >errors (404, 500, etc.) I have a script at work which will automatically generate a mail for a 404 *if* the link the user was coming from comes from our own server (that is, we botched the link our selves). Obviously, it gives a somewhat nicer error page than the default. Below is the script I use at Promo. Stefan ------snip------- #!/bin/sh ERRORPAGE=/export/www/CGI-Daten/Fehlermeldungen/4xx.html if [ -z "$HTTP_REFERER" ]; then export msgde="Sorry, unter dieser URL k–nnen wir nichts anbieten. Sollten Sie die Adresse von Hand eingegeben haben, pr¸fen Sie bitte die Schreibweise.

" export msgen="Sorry, but we can't offer a document with this URL. Should you have entered the address manually, please check the spelling.

" else if echo $HTTP_REFERER | grep -iq '://www.promo.de/'; then export msgde="Oh, da ist uns ein Fehler unterlaufen! Unser Webmaster wird automatisch informiert.

" export msgen="Uh, we messed it up. Our Webmaster is notified automatically.

" if echo $REMOTE_HOST | grep -iq '.promo.de'; then ; else mail -s "Falscher Link auf unserer Seite" $SERVER_ADMIN <der verweisenden Seite.

" export msgen="Sorry, you followed an outdated link. Please contact the administrator of the refering page.

" fi fi echo "Content-Type: text/html" echo "" sh -c "echo \"`cat $ERRORPAGE`\"" -- Stefan Bethke Hamburg, Germany