fixed: do the recursive directory check on the url, not the filename