Make WAM rewriting handle URLs a bit better. It was previously choking on "http://a.b.c?x=y" without a trailing slash on the host.

Main code rev. 2031