How to block specific URL rather than the entire domain on a computer without software?
Solution 1:
It’s not possible. To block an HTTP resource, you need a filter that understands HTTP. No such thing is built into Windows (or any other operating system).
Indeed, with HTTPS (which Facebook uses) you’d have to perform a MITM attack on the encrypted connection to filter its contents. Or, you know, just use a browser extension.
The hosts
file is for hosts only. So you could put www.facebook.com
there and it would work and block the main Facebook web page.