Re: representing UNC as a URI

"Pascal Buhler" <> writes:

> I am trying to find the best way to represent a windows
> share UNC as a file:// URI  and am not having much luck
> finding a definite example on the net so I hope here is a
> good place to ask.
> If I have a windows share called //myshare/mydir
> then in windows explorer typing both of these in to the
> address bar resolves to the correct location
> file:////myshare/mydir
> file://myshare/mydir

For the perl URI module I decided to use the second form.  The first
one does not give sensible answers if combined with relative URIs.

Try to resolve these according to the RFC 2396 rules:

   abs("../otherdir", "file:////myshare/mydir");
   abs("../../otherdir", "file:////myshare/mydir");
   abs("../../../otherdir", "file:////myshare/mydir");

Gisle Aas

Received on Tuesday, 11 May 2004 05:39:38 UTC