I guess you already have that list of blocked sites and you are writing code for block them and redirect to your default redirecting site..
It is a very basic functionality of a standard firewall...
Well for blocking or allowing any site requested from the browser you must capture those request and take action... and i think you already wrote the code for this, it is a firewall program actually. (If you are having problem in writing firewall then ask me)
For redirection there is a HEADER in HTTP specification called LOCATION you need to set this header by your desired redirecting site like "www.codeproject.com" in your response.
Otherwise you can use meta redirect. (Which is easier way...)
<title>Your Page Title</title>
<meta http-equiv="REFRESH" content="5;url=http://www.the-domain-you-want-to-redirect-to.com"></meta></head>
Optional page text here.
this site is blocked and you are redirection to codeproject.com
Here 5 indicates how many seconds you want to wait before redirect, meanwhile you can show a message that, this site is blocked and you are redirection to codeproject.com
Good Luck Wink |