major refactor of URL parsing

a template /path/to/file.html is now mapped to /path/to/file URI