router: do special filepath encoding at a single place

reduce my features diff to 4 lines with xiphux code...
templates: more geturl use (part 2/3)