4

Can I override a hostname in firefox? for example when I access www.example.com it should actually access localhost and not example.com

Does any add-on provide that capability?

1
  • why does someone wanna close this question? Don't we have to specify a reason why someone voted to close it?
    – Priyank
    Jan 25, 2010 at 6:18

4 Answers 4

3

Redirector: https://addons.mozilla.org/en-US/firefox/addon/5064 (donationware)

3
  • I tried using it and maybe I am doing something wrong; but though I could configure it, it still doesn't redirect.
    – Priyank
    Jan 25, 2010 at 5:49
  • Can you give me any more specifics? I tried it and it did work. The download page indicates that it currently works on FF 3.5 only.
    – Jay
    Jan 25, 2010 at 5:58
  • This doesn't do what the user asked.
    – reconbot
    Sep 27, 2011 at 14:00
2

I think that SwitchHost does exactly what you want: https://addons.mozilla.org/en-US/firefox/addon/14258

1

Why not just use HOSTS files, which is what everyone who wants to specify an IP address for a domain name does?

http://www.google.com/search?q=windows+hosts+file&rls=com.microsoft:en-us&ie=UTF-8&oe=UTF-8&startIndex=&startPage=1

http://www.google.com/search?q=mac+hosts+file&rls=com.microsoft:en-us&ie=UTF-8&oe=UTF-8&startIndex=&startPage=1

http://www.google.com/search?hl=en&rls=com.microsoft%3Aen-us&q=linux+hosts+file&btnG=Search&aq=f&aql=&aqi=&oq=

3
  • 5
    I personally don't like using host files because if you are switching between a dev and production site using host files you have no way to tell what environment's host files you are using. If you use a Firefox add in in like Redirector, you can quickly see, if re-directions is happening. And host files are generally used when DNS does not work properly. In my humble opinion :)
    – Rihan Meij
    Jan 25, 2010 at 5:41
  • 2
    Yeah, Rihan is right. My main aim is to test dev in firefox browser which should redirect to local while prod can be tested in chrome. I didn't want to modify hosts file as that would make both browser point to local. That wouldn't serve my purpose.
    – Priyank
    Jan 25, 2010 at 5:48
  • 2
    You need to be superuser to do that, and that will affect every user of the machine...
    – Totor
    Jul 26, 2013 at 9:27
1

Yes, switchhost would be the one, if you are not in MAC OSX 10.5.8. with Firefox 3.5.9. and your hosts file is not longer than a single row. Adding more rows screws up the file, and all hostname values other than first one get deleted. The idea is perfect though.

You must log in to answer this question.