Click here to Skip to main content
15,889,034 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more: , +
if i am trying to open google.com, my browser should redirect me to yahoo.com likewise trying to open any site browser should redirect me to yahoo.com how to do it?
Posted
Comments
Sergey Alexandrovich Kryukov 28-Sep-14 13:10pm    
Why?
—SA
[no name] 28-Sep-14 13:11pm    
If you really want to alienate your users, you could do this using a proxy server. Of course, if you do this, get used to views of angry villagers waving pitchforks.
Sergey Alexandrovich Kryukov 28-Sep-14 13:40pm    
:-)

You can embed BrowserControl (whatever it is; it will depend on your application type) to implement such behavior. As to the "any browser", the question does not even make sense. Here is why: 1) this is not the behavior of the existing browsers; even if you modify one more of existing products, it won't be "any"; 2) if you don't modify some browser product, it will browse to any Web site, by definition; 3) if you do modify any of the browsers in this way, it cannot be called "browser" anymore. :-)

You can only do it by blocking and redirecting the whole network traffic on some system of network. For example, you could can hide the outer world behind a proxy: http://en.wikipedia.org/wiki/Proxy_server#Web_proxy_servers[^].

Anyway, the whole requirements looks like totally dirty busyness; and this is the main part of my answer. Why needs the Web if everything is redirected to Yahoo, and who needs Yahoo if all Yahoo links are blocked?

—SA
 
Share this answer
 
Comments
[no name] 29-Sep-14 0:47am    
Nice explanation.
Sergey Alexandrovich Kryukov 29-Sep-14 1:30am    
Thank you, Sibeesh.
—SA
[no name] 29-Sep-14 1:39am    
You are welcome.
As Mr.Alexandrovich said, It can be achieved only by setting the proxy . If you want the same can be achieved by using System.Net.GlobalProxySelection and System.Net.WebProxy classes in C# dynamically.

Please read here : http://stackoverflow.com/questions/197725/programmatically-set-browser-proxy-settings-in-c-sharp[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900