modified how the server detects subdomains and adjusted it so the server works on a subdomain itself