Return-Path: Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 75093 invoked by uid 500); 12 Apr 2002 12:58:48 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 75081 invoked from network); 12 Apr 2002 12:58:47 -0000 Received: from bull.bourse.ch (HELO bull1.bourse.ch) (194.158.1.1) by daedalus.apache.org with SMTP; 12 Apr 2002 12:58:47 -0000 Received: (from nobody@localhost) by bull1.bourse.ch (8.8.8+Sun/8.8.8) id OAA25374 for ; Fri, 12 Apr 2002 14:58:47 +0200 (MET DST) X-Authentication-Warning: bull1.bourse.ch: nobody set sender to using -f Received: from trifid2(172.20.196.132) by bull1 via smap (V2.1) id xma025372; Fri, 12 Apr 02 14:58:46 +0200 Received: from regulus.bourse.ch (regulus [172.20.196.148]) by trifid2.bourse.ch (8.8.8+Sun/8.8.8) with ESMTP id OAA10593 for ; Fri, 12 Apr 2002 14:58:46 +0200 (MET DST) Received: from bourse.ch (localhost [127.0.0.1]) by regulus.bourse.ch (8.9.3+Sun/8.9.3) with ESMTP id OAA12928 for ; Fri, 12 Apr 2002 14:58:46 +0200 (MEST) Sender: obo@bourse.ch Message-ID: <3CB6DA06.7B107F30@bourse.ch> Date: Fri, 12 Apr 2002 14:58:46 +0200 From: Owen Boyle X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.8 sun4u) X-Accept-Language: en MIME-Version: 1.0 To: users@httpd.apache.org Subject: Re: Need help with / References: <004601c1e216$9a37f180$200110ac@mt45neigaard> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N S�ren Neigaard wrote: > > I have a "erhverv" directory under "PROXY_IP/my/site_manager/static_html/", > and if I do a "www.domain.dk/erhverv/" I get that directory just fine, but > if ommit the last "/" I get 404, and now the PR guys want to be able to use > "www.domain.dk/erhverv". If you leave off the trailing slash, apache doesn't know whether you want a file called "erhverv" in the docroot, or a subdirectory. So it issues a redirect to http://www.domain.dk/erhverv/. But how does it get the servername? It uses the ServerName directive - if that is missing (as in your case) it uses the IP address hence the client gets the wrong URL when the request following the redirect comes in. In other words: Client: http://www.domain.dk/erhverv Server: Sorry, don't have file like that, but I do have a directory. I'll make you a redirect... Oh dear, no ServerName. Never mind, I'll use the IP address. OK client, try http://192.168.1.1/erhverv/ Client: http://192.168.1.1/erhverv/ Server: Hmmm. No ServerName in this request - I'll just go to the first VirtualHost then... Yikes! No file called erhverv! - oh well: 404.... Read the Docs about ServerName and UseCanonicalName to understand what's going on. Rgds, Owen Boyle. --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org