chickadee » uri-generic » uri-relative-from

uri-relative-from URI URIprocedure

Constructs a new, possibly relative, URI which represents the location of the first URI with respect to the second URI.

(use uri-generic)
(uri->string (uri-relative-to (uri-reference "../qux") (uri-reference "http://example.com/foo/bar/")))
 => "http://example.com/foo/qux"

(uri->string (uri-relative-from (uri-reference "http://example.com/foo/qux") (uri-reference "http://example.com/foo/bar/")))
 => "../qux"