replacing hardcoded host with HTTP_HOST