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

Attachment: signature.asc
Description: OpenPGP digital signature



Reply via email to