replaced uris in rules by their index