in reply to Getting the URL of a referer

Alternately, use the URI module and the host() method.