Relocatable web interface URLs [$5]

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.

<bountysource-plugin>

---
There is a **[<total-bounty>$5</total-bounty> open bounty](https://www.bountysource.com/issues/685-relocatable-web-interface-urls-5?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github)** on this issue. Add to the bounty at [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github).
</bountysource-plugin>