Code for forming padded index URLs