add rewrite for subdomains.