Added option to rewrite the base path for urls (i.e. for proxies)