Err, make that "RewriteMap urlencode
int:ampescape".
BTW, the code for rewrite_mapfunc_ampescape() is mainly ripped
out of the URI-encoding function ap_os_escape_path() in main/util.c
BTW, would you mind putting source like that on the server
in /usr/local/src? That's where I've got all the post-install
stuff including Apache, MySQL, etc.