Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 33023 invoked from network); 24 Aug 2005 13:18:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 24 Aug 2005 13:18:25 -0000 Received: (qmail 93832 invoked by uid 500); 24 Aug 2005 13:18:16 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 92959 invoked by uid 500); 24 Aug 2005 13:18:14 -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: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 92946 invoked by uid 99); 24 Aug 2005 13:18:14 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Aug 2005 06:18:14 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [212.67.208.77] (HELO ns.oxfordmusic.net) (212.67.208.77) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Aug 2005 06:18:31 -0700 Received: from Andy (oxfordmusicnet-2.dsl.easynet.co.uk [217.204.209.98]) by ns.oxfordmusic.net (8.10.2-SOL3/8.10.2) with SMTP id j7ODKut32304 for ; Wed, 24 Aug 2005 14:20:56 +0100 Message-ID: <03a001c5a8ae$63895e50$026fa8c0@Andy> From: "oxfordmusic.net" To: References: <7796799a050824052233934e6e@mail.gmail.com> Date: Wed, 24 Aug 2005 14:18:44 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] Which file gets served when the URL does not include a mime type extension. X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N > > thanks for the reply, the reason I ask is because I'm getting a > default behaviour that I cannot find documentation of. > > i.e. if I sent up a server with these two files in a directory it is > always serving the XML file over the HTML file. > > e.g > > http://localhost/test/file > > will return file.xml not file.html > > I don't think "DirectoryIndex" is appropriate here because the file > name does not matter, e.g. it could be fred.xml/fred.html or > bill.xml/bill.html it still chooses the .xml file over the html file > if both are there.. > correct. "DirectoryIndex" is not approariate here. that only governs the behaviour when http://localhost/test is requested. what you need to read up on is Content Negotiation: http://www.google.co.uk/search?hl=en&q=apache+content+negotiation&btnG=Google+Search&meta= which is how the server decides which file to server based on what the browser has requested and your own rules. a simple way to define it is, i believe, to place a file called file.var in the same directory with contents something like this: URI: file URI: file.html Content-type: text/html; qs=1 i am by no means an expert but this should at least give you something to get started on. andy --------------------------------------------------------------------- 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 " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org