Absolute to relative URL?

Jon Ribbens jon+usenet at unequivocal.co.uk
Thu Apr 4 08:11:15 EST 2002


In article <3CAC1665.8040209 at mxm.dk>, Max M wrote:
>> relative_url("http://foo/a/b/c", "http://foo/a/d")
>>  --> return: "../d"
> 
> I hope you mean that the result should be "../../d" ??

No, he means "../d".

http://foo/a/b/c + d       == http://foo/a/b/d
http://foo/a/b/c + ../d    == http://foo/a/d
http://foo/a/b/c + ../../d == http://foo/d




More information about the Python-list mailing list