Jay DeKing wrote:
> On Friday 04 July 2003 9:27 am, Frederic Crozat honored me with this
> communique:
>>
>> 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.

AFAIK this generally does not apply to web hosting, but AFAIK the trailing
/ is important in certain scenarios of virtual hosting (possibly in
combination with url rewriting). I have come across sites that don't
respond without the trailing /, and AFAIK they were virtual-hosted.

> 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>.
>

$ man bash |col -b|grep -C4 CDPATH

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

And sometimes it is bad to add it (depending what you are doing). rsync
for one is very sensitive to the trailing /. But you shouldn't generalise
this argument too far away from the original topic or URLs, since it gets
very copmlex and off-topic ...

Regards,
Buchan



Reply via email to