For example, I have a development site on a different server but I'm trying to copy content over from the live site so it'd be handy to have the live site in IE and the dev site in FF.

I tried FoxyProxy but I can't seem to get it to work.

share|improve this question
2  
Why would you downvote this? Using different DNS names is obviously the normal way to do this, but having firefax override DNS is still an interesting problem. – jj33 Jan 30 '09 at 14:35
1  
@jj33 it would also be an interesting problem if you forgot you'd done it. that might take some time to debug – Simon_Weaver Jan 31 '09 at 11:11
up vote 6 down vote accepted

I am using the SwitchHost extension exactly for this problem: https://addons.mozilla.org/en-US/firefox/addon/14258

It is easy to configure, and even more easy to switch hosts.

share|improve this answer
10  
It seems to switch /etc/host files and not dns servers. – Seun Osewa Dec 31 '10 at 13:12
    
Not available for Firefox 9.0.1 – RickyA Jan 21 '12 at 21:25
    
it's not working anymore – Ohad Cohen Jan 28 at 22:09

DNS resolving is usually done at the system level and not at the application level, so you can't normally have one program use one dns and another program use a different dns. I'm not aware of any firefox extensions that allow you to use a different dns.

share|improve this answer
1  
Firefox (now) does DNS lookups internally, so it should be possible to configure a different DNS server somewhere. – trapezoid Feb 8 '15 at 17:06

It appears from your question that you already have a second set of DNS servers available that reference the development site instead of the live site.

I would suggest that you simply run a standard SOCKS proxy either on that DNS server system or on a low-end spare system and have that system configured to use the development DNS server. You can then tell Firefox to use that proxy instead of downloading pages directly.

Doing it this way, the actual DNS lookups will be done on the proxy machine and not on the machine that's running the web browser.

share|improve this answer

What about having different names for your dev and prod servers? That should avoid any confusions and you'd not have to edit the hosts file every time.

share|improve this answer
1  
Maybe he needs to move data from one server to another, and change DNS? – bjornl Jan 25 '11 at 21:08

I wonder if you could write a custom rule for Fiddler to do what you want? IE uses no proxy, Firefox points to Fiddler, Fiddler uses custom rule to direct requests to the dev server...

http://www.fiddlertool.com/fiddler/

share|improve this answer
    
Yes, this is possible (and simple - see the Fiddler Cookbook, it's approx. fifth example from the top) - in addition, newish Fiddler betas have this useful feature built-in (main menu->Tools->HOSTS...). – Piskvor May 29 '11 at 15:27

I know this might be not actual but I found solution.

  1. Download HandyCache - sorry, don't know English site
  2. Just unzip folder anywhere you want
  3. Start EXE file
  4. Change language to English - looks like Английский (США)enter image description here
  5. Go to DNS Cache and (this IMPORTANT) add domain name and IP to resolve. And set up more than 24hours to update records.
  6. Then set up firefox to use this proxy HandyCache as 127.0.0.1 port 8080.

Finally HandyCache will return desired IP address for you test domain regardless OS's DNS and its hosts file.

Enjoy!

share|improve this answer

Since http proxy protocol is similar to raw http protocol, you can redirect desired traffic to your development server by telling firefox it's a proxy server.

keep in mind that this won't let you use https connections.

just copy the following code into a .pac file (enter your site domain and IP address, of course), and switch development/production just by changing proxy configuration.

function FindProxyForURL(url, host) {
    var prox4site = {
        "mysite.com":"PROXY 10.0.1.100:80",
        "www.mysite.com":"PROXY 10.0.1.100:80"
    }

    return prox4site[host] || "DIRECT";
}
share|improve this answer

Go to options->Advanced->Network->Settings->Automatic proxy configuration url and enter 8.8.8.8 All you Mozilla traffic uses Google dns now.

share|improve this answer
    
The proxy is not the DNS! – oliverpool Jul 24 '15 at 11:43

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.