Solved

change dns so that it always take me to one site

Posted on 2013-02-01
10
186 Views
Last Modified: 2013-02-01
is there an example somewhere that i could find to do the following:
when i open my browser, it will always direct me to one website. so say i want to go to www.cnn.com, it will take me to www.yahoo.com and www.google.com, it will take me to www.yahoo.com

in c# please. thanks
0
Comment
Question by:StewSupport
  • 5
  • 5
10 Comments
 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 38845205
I can't think of any legitimate reason for this.  Can you explain what it is you're trying to accomplish?  Why can't you change DNS manually?
0
 

Author Comment

by:StewSupport
ID: 38845222
it doesn't have to be an app. is there a way to change the setting in ie manually?
0
 

Author Comment

by:StewSupport
ID: 38845430
I've requested that this question be deleted for the following reason:

change proxy
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 34

Accepted Solution

by:
Paul MacDonald earned 500 total points
ID: 38845290
You can edit the "hosts" file on the system.  That will accomplish much the same thing, but it will be for all applications, not just IE.

Here are generic instructions for a Windows system:
http://www.howtogeek.com/howto/27350/beginner-geek-how-to-edit-your-hosts-file/
0
 

Author Comment

by:StewSupport
ID: 38845320
yes but that will prevent the user going to that site, what if i want to redirect them to one site.
0
 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 38845336
Change the IP address in the hosts file so it appears to be a particular host name.  In other words...
     w.x.y.z     www.yahoo.com
...where w.x.y.z is the IP address for cnn.com.  Then, whenever someone tries to go to www.yahoo.com, they get sent to cnn.com.

If you have a proxy - and your closing reason implies you do - that might be a better/easier solution.
0
 

Author Comment

by:StewSupport
ID: 38845344
can we use webproxy in c# instead of host file?
0
 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 38845362
If you mean "webproxy" as in the .Net control, the answer is no.  

I meant "proxy" as in a device that sits between the client and the Internet to control access.
0
 

Author Comment

by:StewSupport
ID: 38845373
ok but instead of listing out the address can we do like * for all addresses? that way you only do it once time and do i need to restart the machine for this to work?
0
 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 38845417
No, you can't use wildcards (at least not on Windows machines).
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
insert value of checklistbox checked 4 38
jquery + C#.net radiobuttonlist 3 43
Securing WEBAPI on Azure 2 18
Web page design problem 3 11
Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question