Block specific URL on web browsers

user

I want to block certain URLs on browsers. I don't want to block whole site. For example, I want to block Google Reader, but not whole Google domain. Is there any way I can do it?

Joshua Robison

The answer will only SLIGHTLY differ by the operating system you are using. I'm running Ubuntu on a powerpc :p but in general the same rules apply on windows and mac as well. If these instructions do not work for you then I will adapt this answer for your OS. For now here is the Linux method.

The only way I have found after hours of searching, to do this, is to install privoxy.

Once you install privoxy you need to edit the /etc/privoxy/config file in the following manner:
1) Find where it says

#listen-address  localhost:8118

and uncomment this line so that it says

listen-address  localhost:8118

2) Add the following lines to the bottom of this config file:

actionsfile blacklist.action   
actionsfile whitelist.action   

3) Now you need to create these action files in a text editor as root: a) gksu gedit /etc/privoxy/blacklist.action and add the following

{ +block }
www.apple.com/itunes
twil.tv/category/video
www.url.com/page

anything you add under the {+block} line will be blocked

b) Respectively you should create the whitelist.action file

gksu gedit /etc/privoxy/whitelist.action

and add the lines

{ -block }
www.google.com

or whatever you find privoxy blocking that you want to protect.

After you have saved the three files you have to restart privoxy:

sudo /etc/init.d/privoxy restart

and you have to make sure that your proxy settings in your browser or in your network configurations are correct, adding localhost as the proxy and 8118 as the port number will be all you need.

The SERIOUS and UNFORTUNATE drawbacks to privoxy is that it is a proxy so all anyone needs to do to stop it working is turn it off, or use a different browser. I am still searching for a way to add privoxy to my router or to somehow run it , not as a proxy, but as my default on port 80, then you could lock down the config files so that no one could change them.

This is the closest you will find to an answer to your problem.

If it doesn't appear to be working at first don't forget to flush your browser's cache because the pages you have blocked may show up from cache even after they have been blocked.

also you might want to turn this off:

make sure that enforce-blocks 1 is set to 1 in the /etc/privoxy/config file

enforce-blocks 1

Otherwise, when the page blocked warning comes up, it will have an option to go to the blocked page anyways despite being blocked and completely make privoxy meaningless.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Web browsers removing slash in URL

From Dev

Web browsers removing slash in URL

From Dev

Block one specific URL by htaccess

From Dev

How to use Apache to block a specific URL type?

From Dev

block ip addresses that request a specific url

From Dev

How to use Apache to block a specific URL type?

From Dev

Block a specific request by it's url in firefox

From Dev

htaccess block GET request to specific URL

From Dev

IIS | Block page specific url except for specific internal IP address

From Dev

How to block unknown browsers in .htaccess?

From Dev

Web Browsers for Oracle Linux

From Dev

Web Development on different browsers

From Dev

javascript in mobile web browsers

From Dev

How to block POST requests to a specific URL or text in the Apache access log

From Dev

How can I block a specific URL on a DD-WRT router?

From Dev

Block visits to a specific url with fail2ban

From Dev

How to get the base url of a specific store view in a static block?

From Dev

How can I block a specific URL on a DD-WRT router?

From Dev

Redirect/Block outgoing HTTP traffic for a specific URL on Mac

From Dev

Block visits to a specific url with fail2ban

From Dev

Is it possible to block images from a specific URL using the “hosts” file?

From Dev

How Browsers Work of modern web browsers

From Dev

dotnet run web site with specific url

From Dev

dotnet run web site with specific url

From Dev

Site specific font override in browsers?

From Dev

No sound in the web browsers ubuntu 13.04

From Dev

SSL Certificate validation by web browsers

From Dev

No sound in the web browsers ubuntu 13.04

From Dev

Windows browsers in ubuntu for web developent

Related Related

HotTag

Archive