I am searching for an easy way to accomplish this. The host part is easy, just what comes between http:// and the next /. however logical host seems to be tricky. for instance, shopping.yahoo.com and yahoo.com should both get mapped to the same logical host, yahoo.com.
Is there a module that does this? perhaps a set of heuristics which could be used?