Match REDIRECT_BASE_DOMAIN as well as subdomains (#1259)