It happens that /etc/hosts
file doesn't support wild card entries.
You'll have to use other services like dnsmasq. To enable it in dnsmasq, just edit dnsmasq.conf
and add the following line:
address=/example.com/127.0.0.1
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…