Restrict access to all url's except few in windows hosts file

My use case is that i need to make hosts file to resolve only few url's and restrict the all other url's. Is it possible with hosts file ?