0

I know that there is a way to make any defined URL resolve to a different URL, but I can't remember how or where to define this setting.

I understand this is ambiguous, so consider the following example. I am building http://www.webapplication.com. I have set up the web site in IIS 7. However, I haven't forwarded the nameservers to resolve my server yet, so the URL points to somewhere else completely. However, when I access http://www.webapplication.com locally, I would like the IIS 7 website to be resolved.

How can I do this? Is this a setting in IIS, the individual browser (IE or Chrome) or somewhere else (like my network settings)?

1 Answer 1

3

The name resolution is handled through DNS so if you need the host to resolve to a different machine you would need to modify DNS. If you only want it to resolve differently for your test machine you could modify the \windows\system32\drivers\etc\hosts file on the machine you'll be browsing from.

Note 1: the typical location for hosts is under \windows, but you should check %SystemRoot% for the locaiton on your system.

Note 2: your AV program may complain if you try to edit this file.

You would have to modify your DNS server to change DNS. I can't tell you whether it is a local or internet based DNS.

3
  • The hosts.txt file sounds familiar. Where is that located? Also, where do I go to modify DNS? Jun 10, 2011 at 21:32
  • Linux/Mac uses /etc/hosts and on Windows you'll need to edit C:\Windows\system32\drivers\etc\hosts Jun 10, 2011 at 21:39
  • Thanks Matt. Its hosts not hosts.txt. fixed above
    – uSlackr
    Jun 10, 2011 at 21:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .