0

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?

1

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.

1
  • Yeah, my IIS settings were jacked, I got it to work.
    – blu
    Nov 6 '10 at 22:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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