Append support to replica sets

Fixing URL and indexes support when using replica sets.