Looking to adapt this terminal command to block pages, not full websites

0

I am trying to block a specific page on a website (a Reddit thread) from being accessed on my Mac laptop. It contains the answers to a mystery game I got for my fiancée, and I want to make sure she doesn't accidentally find it and spoil the game.

I recently found this tutorial which is almost exactly what I need, except for one catch: trial-and-error has shown that it only seems to work with full domains (e.g. "reddit.com") rather than specific URLs (e.g. "reddit.com/r/mystery").

Is there a way to adapt this terminal command for use with more specific URLs? Or, failing that, is there a similar way to permanently block any access to a certain URL from a Mac laptop?

Nerrolken

Posted 2015-12-01T21:35:05.640

Reputation: 103

Answers

1

Nope, that /etc/hosts DNS-name blocking trick only knows about whole server names, not full HTTP URLs.

Spiff

Posted 2015-12-01T21:35:05.640

Reputation: 84 656

Damn. Alright, well thanks for the confirmation! – Nerrolken – 2015-12-01T22:10:27.473

0

You may want to have a look at this page which delves into a similar question. There's a lenghty discussion about a tool called privoxy that was used. There is also a reference in one of the responses to blacklist.action and whitelist.action files but I couldn't find any other references to these. GL.

SaxDaddy

Posted 2015-12-01T21:35:05.640

Reputation: 3 181