I made a website, and I called it rar.com, which happens to be a real site (that I did not create). I want my site that is listed on IIS to redirect me to a local web page instead of the external site.
Add another binding with same info, but the host name is set to rar.com
Goto: C:\Windows\System32\drivers\etc\hosts and add the following line to the file: 127.0.0.1 www.rar.com (I also tried it with rar.com)
Go to IE, and it doesn't work.
What am I missing here? Sorry, I'm an IIS newbie. Environment: One machine running Windows Server 2008 R2 and IIS 7.0
You sure you saved the hosts file? Did you open and edit it as Administrator?
If your server also serves as DNS server for your workstation(s) you could also just add the rar.com domain to your DNS server and have an A-record point to the server's address. This will not work if your workstation uses, for example, your modem/router/ISP's DNS address.
EDIT The IP-address should not be 127.0.0.1 (which is localhost!) if you are running the browser on a workstation and the website on a server; in that case you should put the server's IP-address in your hosts file on your workstation!
ping rar.com
). Which IP is returned? You could try (also on the commandline) a ipconfig /flushdns
if the wrong IP is returned. If after that the wrong IP then chances are about 99.999% that you edited your hosts file incorrectly - RobIII 2012-04-05 22:21
ping rar.com
returns 127.0.0.1
or the machine's IP. Is actually IIS running? When you enter rar.com in your browser's address bar you get "Grupo rar" - RobIII 2012-04-05 22:24