Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Can I redirect a DNS entry to a local IIS instance? I am on a Windows 7 dev box.

I have a domain for hosting static content (images, custom js, css, etc) on a cloud environment. I'd like to avoid hitting that server during development of the site.

I can see two ways to do this:

  1. Create a virtual machine for the site in vmware and map the name to the virtual's ip in etc/hosts.
  2. Use a preprocessor macro to prefix image locations with the url for dev/stage/prod.

Is there an easier way to do this? After searching on SF I found unbound but it looks like its for *nix. Any other ideas?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Windows 7 supports hosts analog to Linux.

Just put the Servername you don't want to be hit in %WINDIR%\SYSTEM32\DRIVERS\ETC\HOSTS

Edit

This requires the static content to be mirrored on a local instance.

share|improve this answer
    
Yeah, my IIS settings were jacked, I got it to work. –  blu Nov 6 '10 at 22:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.