fix redirects for apps with subdomains