server: fix internal redirects when no host