added removePrefixLength option to remove characters from the beginning of the url