fix redirects to full uri when using prefixes