also, don't do this for URLs that already end in slash