The way I handle this is to offload the work to the httpd. I use nginx for this, so consult your preferred server’s documentation if you don’t. For nginx, setting the root
in the relevant server
block to /usr/share/nginx/html/foo
should act equivalently to setting baseHref
to /foo/
and serving out of a root
of /usr/share/nginx/html
.
1 Like