removed redundant check for file extension in URL