stckvrw
stckvrw

Reputation: 1791

How to block URL with parameter in Windows hosts file

I know how to block a whole domain in C:\WINDOWS\system32\drivers\etc\hosts. But how to block only URL with some parameter for example something.com/...&key=value but something.com as domain to be unblocked. Is that possible?

Upvotes: 0

Views: 1937

Answers (1)

beatcracker
beatcracker

Reputation: 6920

This is not possible using HOSTS file. Blocking via HOSTS works on the lower level, assigning unreachable IP address to the domain name. URL's can't be blocked that way, you need some kind of proxy to do that.

Info from Wikipedia:

The hosts file is a computer file used by an operating system to map hostnames to IP addresses. The hosts file is a plain text file, and is conventionally named hosts.

Upvotes: 3

Related Questions