From owner-freebsd-questions@FreeBSD.ORG Wed Dec 29 15:49:08 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B714D16A4CE for ; Wed, 29 Dec 2004 15:49:08 +0000 (GMT) Received: from male.aldigital.co.uk (male.thebunker.net [213.129.64.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id C39AC43D39 for ; Wed, 29 Dec 2004 15:49:06 +0000 (GMT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from gravitas.thebunker.net (gateway.ash.thebunker.net [213.129.64.4]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by male.aldigital.co.uk (Postfix) with ESMTP id 4650F9765E; Wed, 29 Dec 2004 15:49:05 +0000 (GMT) Received: from [127.0.0.1] (localhost [127.0.0.1])iBTFn468001511; Wed, 29 Dec 2004 15:49:04 GMT (envelope-from m.seaman@infracaninophile.co.uk) Message-ID: <41D2D1E9.6090007@infracaninophile.co.uk> Date: Wed, 29 Dec 2004 15:48:57 +0000 From: Matthew Seaman Organization: Infracaninophile User-Agent: Mozilla Thunderbird 1.0 (X11/20041213) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Jay O'Brien" References: <41CDC8E8.6010704@att.net> <41CE3405.2090409@att.net> In-Reply-To: <41CE3405.2090409@att.net> X-Enigmail-Version: 0.89.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigA23AB4A8FC5F25787F836079" cc: FreeBSD - questions Subject: Re: web server permissions question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Dec 2004 15:49:08 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigA23AB4A8FC5F25787F836079 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Jay O'Brien wrote: > I found how to get around this problem, and it isn't permissions > at all. On the other web server I use, I use relative and shortened > addressing on links, for example /xyz which, when selected by the > user, would then send the user the /xyz/home.html file, in the xyz > subdirectory under the directory where the home page lives. Hmmm... Actually, that's how it's supposed to work: the automatic addition of trailing slashes is not implied. Remember that even though URLs look a bit like directory paths, they are actually very different beasts indeed. As a webmaster you can, optionally, configure your site to be helpful by adding slashes to requests, if you want, but you should never rely on that behaviour. If you're writing HTML then you should always take care to state the URLs correctly. The reasons why /foo is a different URL to /foo/ are all to do with how aliasing works in HTTP -- ie. exactly how the URL is mapped onto the filesystem (or to some sort of virtual space like a Java object hierarchy) in order to retrieve the requested data. It isn't always simple -- in fact, this is one of those occasions where you might hear the dread term "arbitrarily complex". > Now, with this version, I find that I must add a trailing /, using > /xyz/ instead of /xyz, and with that change everything works as > expected. I can now access home.html files in subtending directories > with such shortened relative links from my LAN and from the internet. Take a look at this article which explains (amongst a lot of other interesting stuff) how to get your Apache server to do internal redirects for these trailing slash cases -- from the user PoV it will "just work": http://httpd.apache.org/docs-2.0/misc/rewriteguide.html Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 8 Dane Court Manor School Rd PGP: http://www.infracaninophile.co.uk/pgpkey Tilmanstone Tel: +44 1304 617253 Kent, CT14 0JL UK --------------enigA23AB4A8FC5F25787F836079 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iQCVAwUBQdLR75r7OpndfbmCAQLSFwQAlyrsSfzsXseR4rGi6WdCzmqXXN2K9QU/ JZWRxSAWZvd42geywt1VRMDMe/KhOLcB2OcpFRxMBf+Hu0bUzg16ywQigzrswNxf R2a6ku3TI3skAwwA8mb6S/wfDJzIkim9qtzdIgzmkMbptXkxu+GNXx743fzOvEQ9 /jro0Ak742w= =dmEu -----END PGP SIGNATURE----- --------------enigA23AB4A8FC5F25787F836079--