':type url: str
:rtype: str'

def _url_format(self, url):

    path = os.path.dirname(self.zmirror.parse.remote_path)
    if (path == '/'):
        path = ''
    path_up = os.path.dirname(path.rstrip('/'))
    if (path_up == '/'):
        path_up = ''
    return url.replace('{ext_domain}', self.zmirror.parse.remote_domain).replace('{path}', path).replace('{path_up}', path_up).replace('{our_scheme_esc}', slash_esc(self.zmirror.my_host_scheme)).replace('{our_scheme}', self.zmirror.my_host_scheme).replace('{our_domain}', self.zmirror.my_host_name)
