Updated to support base redirection and coexisting with a static html site