How to block specific URL instead of whole domain I am looking to block a specific url like:

http://foobar.com/abc.php


instead of the whole domain of 

foobar.com


I have tried to edit the host file by adding an entry

127.0.0.1 foobar.com/abc.php


but it didn't work. Tried restarting the data too.

Can anyone tell me what can be done?
i'm sorry to tell you, it wont work.

In the hostfile you can only set an IP-Adress of an domain manually.
For example:
I dont want that my pc always looks for IP-Adress for ilovethis.net.

Or a better one:
I have many photos, videos and audio on my homeserver. But i dont want to always type 192.168.178.178 (etc.) in my Browser. 
Yes! I would add an entry to my hostfile which says: Domain home.server should go to 192.168.178.178 (looks like: 192.168.178.178 home.server)

I hope you know what i mean.
This was not made for specific url,
its for local DNS manipulation.

Greetings,
Fischmaster