misc url rewrite corrections/improvements, additional testing for poorly formed URLs (and error page), comments