1

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?

1

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

  • Actually on windows it works perfectly. Just by adding the url on windows PC that particular URL is blocked but on android its not working. – Aviral Sangal May 8 '16 at 2:18
  • Yes, of course. But i dont known if it even works in whole Linux. – Fischmaster May 8 '16 at 7:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.