def get_relative_url(url):
<EOL>stripped_site_url = url.replace("<STR_LIT>", "<STR_LIT>")<EOL>baseurl = "<STR_LIT:/>" + "<STR_LIT:/>".join(stripped_site_url.split("<STR_LIT:/>")[<NUM_LIT:1>:])<EOL>if baseurl[-<NUM_LIT:1>] == "<STR_LIT:/>":<EOL><INDENT>return baseurl[:-<NUM_LIT:1>]<EOL><DEDENT>else:<EOL><INDENT>return baseurl<EOL><DEDENT>
Returns the relative URL from a URL. For example:

'http://web.net' -> ''
'http://web.net/' -> ''
'http://web.net/1222' -> '/1222'
'http://web.net/wsadas/asd' -> '/wsadas/asd'

It will never return a trailing "/".

@param url: A url to transform
@type url: str

@return: relative URL