ignore potential query string when seeing if URL ends in filename