remove any trailing slashes in the url that would break the regex recognition of the index name