Do you need to escape the period in the regular expression? (although I doubt you will run into cases of files named `indexshtml` anyway)