upated to allow subdomain routing