def hide_index_html_from(path):
    """Remove ``index.html`` suffix as well as trailing slashes (if
    any).
    """
    if not path.endswith('index.html'):
        return path
    return path[:-10].rstrip('/')
