Fixed url directory issue depeding on file extension