Solved

change dns so that it always take me to one site

Posted on 2013-02-01
10
184 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 33

Expert Comment

by:paulmacd
Comment Utility
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
Comment Utility
it doesn't have to be an app. is there a way to change the setting in ie manually?
0
 

Author Comment

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

change proxy
0
 
LVL 33

Accepted Solution

by:
paulmacd earned 500 total points
Comment Utility
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
Comment Utility
yes but that will prevent the user going to that site, what if i want to redirect them to one site.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 33

Expert Comment

by:paulmacd
Comment Utility
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
Comment Utility
can we use webproxy in c# instead of host file?
0
 
LVL 33

Expert Comment

by:paulmacd
Comment Utility
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
Comment Utility
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 33

Expert Comment

by:paulmacd
Comment Utility
No, you can't use wildcards (at least not on Windows machines).
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now