[REBOL] Re: URL comparisons
From: hallvard:ystad:helpinhand at: 8-Apr-2003 16:21
Dixit Tom Conlin (01.48 08.04.2003):
>I do not have a shorter way but I do have a way that addresses
>a few more problems than a trailing slash...
>canotical-url: func[ url /local t p q][
> replace/all url "\" "/"
> t: parse url "/"
> while [p: find t ".."][remove remove back p]
> while [p: find t "."][remove p]
> p: find t ""
> while [p <> q: find/last t ""][remove q]
> for i 1 (length? t) - 1 1[append t/:i "/"]
> to-url url-encode/re rejoin t
>]
Well, it doesn't really address my needs, but thanks anyway.
~H