Date: Wed, 29 Dec 2004 15:48:57 +0000 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: "Jay O'Brien" <jayobrien@att.net> Cc: FreeBSD - questions <questions@freebsd.org> Subject: Re: web server permissions question Message-ID: <41D2D1E9.6090007@infracaninophile.co.uk> In-Reply-To: <41CE3405.2090409@att.net> References: <41CDC8E8.6010704@att.net> <41CE3405.2090409@att.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41D2D1E9.6090007>