chickadee » uri-common » 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-common)

(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"