sed replace spaces between quotes with a variable

I have lines with:

elseif (req.http.host ~ "^(www.)?edificationtube.com$|www.edificationtube.org www.edificationtube.net edificationtube.org www.edificationtube.com edificationtube.net") {
elseif (req.http.host ~ "^(www.)?collegecontender.com$|www.collegecontender.com collegecontenders.com www.collegecontenders.com") {
elseif (req.http.host ~ "^(www.)?adaxle.com$|www.adaxle.net www.adaxle.com adaxle.net www.adaxle.org www.adaxle.biz adaxle.org adaxle.biz") {

Within a txt file, I want a sed command that would go through only lines that contain "req.http.host", but only replace the spaces within those lines it finds between the quotes, so the end result would look like:

elseif (req.http.host ~ "^(www.)?edificationtube.com$|www.edificationtube.org|www.edificationtube.net edificationtube.org|www.edificationtube.com|edificationtube.net") {
elseif (req.http.host ~ "^(www.)?collegecontender.com$|www.collegecontender.com|collegecontenders.com|www.collegecontenders.com") {
elseif (req.http.host ~ "^(www.)?adaxle.com$|www.adaxle.net|www.adaxle.com|adaxle.net|www.adaxle.org|www.adaxle.biz|adaxle.org|adaxle.biz") {

Can anyone guide me on how this can be done with sed/awk?

Thanks!

This will replace the space after .com .net or .org with a pipe.

 sed '/req.http.host/s/\([com|net|org]\) /\1|/g' file

That gives me the output of:

       elseif (req.http.host|~ "^(www.)?labourtv.net$|www.myertec.co.uk myertec.co.uk www.labourtv.net") {

Close, but I don't want it to add an extra | between host and ~, I just want it on every space between the quotes to add a pipe (|).

Let me know if its possible here.

Thanks.

awk -F "\"" '/req.http.host/ {gsub(/ +/, "|",$2)}1' OFS="\"" urfile