Relocatable web interface URLs

Most of the links in the web interface are hardcoded and have an absolute path. Consequently the web interface can not be relocated into a subfolder what would be useful with a web server configured as a reverse proxy.

E.g. on a server with many different services one may want to have the ZNC web interface under an URL like:
https://domain.com/znc/ (not directly on https://domain.com/ and not under some unusual port)

I tried to change the URLs in the templates, but unfortunately there are some hardcoded recirect directives in the source. A simple general solution would be to allow prefixing all URLs with a specified string.