Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The web application we develop is doing certain things depending on the domain and subdomains in the address. To be able to develop and test everything on a local environment, one would need to bind the domains to, using the hosts file.

However, this would cut that machine off from accessing the live server domains.

Question: Is there a browser-level hack that allows one to do hosts-like stuff, only for that browser?

UPDATE: A proxy .pac file can do this just fine. Like this:

function FindProxyForURL(url, host) {
      if (shExpMatch(url,"**")){
         return "PROXY";


share|improve this question
Searching for Firefox add-ons here… only returns one possibly useful, but limited to Linux. We also use Mac and Windows. – Gabriel R. Nov 11 '10 at 15:42
up vote 2 down vote accepted

You can do pretty clever things with a proxy auto-config file. Try one that returns PROXY for the domains you want affected and DIRECT for the rest.

share|improve this answer
Thanks for the tip! I'll check this out. – Gabriel R. Nov 13 '10 at 9:43
This works great! And with an extension like Proxy Switchy for Chrome I'm all set. Thanks! – Gabriel R. Dec 6 '10 at 13:48

Maybe there's a HTTP proxy that will do what you want?

share|improve this answer

Your Answer


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.