#207330 by c960657: allow custom URL rewriter to work on base_url and fix urlencoding of front page URL with a path prefix