On Friday 04 July 2003 9:27 am, Frederic Crozat honored me with this 
communique:
> On Fri, 04 Jul 2003 15:24:37 +0200, Guillaume Rousse wrote:
> > Ainsi parlait Per �yvind Karlsen :
> >> --=-=-=
> >>
> >> * Fri Jul 04 2003 Per �yvind Karlsen <[EMAIL PROTECTED]> 1.2.9-2mdk
> >>
> >> - put / at the end of the url after strong wishes from David Walser:)
> >
> > I've never understood why so many people included a final / when citing
> > an URL. Could you explain why ?
>
> Because it is the correct way to form an URL :
>
> http://foobar/foo/bar should grab file bar in foo directory
>
> http://foobar/foo/bar/ should grab index file in bar directory..
>
> Many web servers do a redirection when first case doesn't apply and
> 'bar' directory exist.. But it is BAD :)

The trailing "/" is especially important (in general) because if you run "ls" 
on a directory name that is actually just a link to another directory, you 
don't get the contents of that directory - just the name of the link. This 
little feature bites me all the time in Solaris (at work) because I have a 
number of links set up this way to make it easier for me to cd to my userware 
directories (I write a lot of scripts, etc. that I want others to be able to 
access - but I don't want other users to be able to have access to my /home 
subdirectories, so I put them in a semi-public location and put my own links 
in /home/usr). I am forever forgetting the trailing "/". However, it is still 
easier for me to type ~/usr/<linkname>/ than to type something like 
/data/mgc_arch/cust/etc/mgc_tk/en/userware/<dirname>.

Yes, in my opinion it is bad to leave off the trailing "/".

Sorry about the windy explanation!

Jay

-- 
Opportunity is missed by most people because it is dressed
in overalls and looks like work.
- Thomas Edison


Reply via email to