fix subdomain bug for localhost and prod