Is the there a way to get Firefox to ignore the Hosts file without shutting it
(Firefox) down?
> Sometimes, an entry in the Hosts file will prevent Firefox from loading certain
> content that I want to view.
edit the hosts and remove whatever URL you want to see - its a plain
text file.
Renaming the Hosts file while Firefox is open only has
> an effect if I shut down Firefox and restart it, which is a pain.
and kinda dumb as well
>
> Is the there a way to get Firefox to ignore the Hosts file without shutting it
> (Firefox) down?
Not that I know of - kinda useless to have it if you ain't gonna use it.
IMO
Try this:
http://www.abelhadigital.com/2007/06/hostsman-3040-released.html
--
Irwin
Please do not use my email address to make requests for help.
Knowledge Base: http://kb.mozillazine.org/Main_Page
-Erik
--
hackerkey://v4sw5hw2ln3pr5ck0ma2u7LwXm4l7Gi2e2t4b7Ken4/7a16s0r1p-5.62/-6.56g5OR
Try turning Firefox offline then online after temporarily renaming the
hosts file (untested).
Rationale: The hosts file is a first-level DNS server. Firefox 1.0 used
to invalidate its DNS cache when going offline then online. Don't know
how the situation has evolved since then though.
Best regards,
Tony.
--
Captain Penny's Law:
You can fool all of the people some of the time, and some of
the people all of the time, but you Can't Fool Mom.
It works!
Thanks, Tony!
so, thats how that works! Thanks for the tip Tony
--
*IMPORTANT*: Sorry folks, but I cannot provide email
help!!!! Emails to me may become public
Notice: This posting is protected under the Free Speech
Laws, which applies everywhere in the FREE world,
except for some strange reason, not to the mozilla.org
newsgroup servers, where your posting may get you banned.
Peter Potamus & His Magic Flying Balloon:
http://melaman2.com/cartoons/singles/mp3/p-potamus.mp3
http://www.toonopedia.com/potamus.htm
I'm not totally sure yet, but indications are that it is not necessary to toggle
offline/online when renaming the Hosts file beck to "Hosts", but only when renaming
it to something else. Also, clearing the cache may be necessary to make the change
complete, but I am not entirely sure. I will just go along and try when I need to
gain access to material that is being block by Hosts.
Hi Jack,
Here is a batch file that will rename your HOSTS file and instruct you
to put FF Offline and back Online. Just copy the text below into a
notepad document and save it with a bat extension to use. It is
assuming Windows is on C:. If not, change the drive references in the file.
:: Begin batch file
echo off
echo This will temporarily disable the Hosts file
echo .
echo Set Firefox Offline using File, Work Offline before pressing a key
echo .
pause
rename C:\WINDOWS\system32\drivers\etc\HOSTS HOSTSOFF
echo The HOSTS file is now disabled. Click File, Work Offline before
pressing a key to access HOSTS blocked sites.
pause
echo This will re-enable the Hosts file
echo .
echo Set Firefox to Offline using File, Work Offline before pressing a key
pause
rename C:\WINDOWS\system32\drivers\etc\HOSTSOFF HOSTS
echo .
echo The HOSTS file is now enabled. Click File, Work Offline before
pressing a key
echo .
echo The window will now close
pause
exit
:: End batch file
--
Terry R.
Anti-spam measures are included in my email address.
Delete NOSPAM from the email address after clicking Reply.
That won't work. The host file affects all TCP/IP traffic. Thus the
ping will use the host file to resolve whatever same as FF, IE,
Thunderbird, your IM client, etc. So the ping will return what FF
would see anyhow based on the host file.
JB
--
hackerkey://v4sw5hw2ln3pr5ck0ma2u7LwXm4l7Gi2e2t4b7Ken4/7a16s0r1p-5.62/-6.56g5OR
That didn't make it work for me. I have my router in my hosts file
"router 192.168.x.x".
I navigated to my router using "router". I then navigated away from
it. From the command line I renamed my hosts file and then tried to
ping router. It could not resolve. Went into FF and it was still
able to navigate to "router" even after clearing my cache. In another
instant I could not. Something is being retained somewhere.
I even tried the following:
route delete * (clear the routing table)
arp -d * (clear the arp table)
ipconfig /flushdns (clear the dns entries already resolved)
and then cleared the cache in FF
Still to no avail. In other instances just waiting a few minutes did
the trick even without doing all of the above.
If I right click on my network icon and choose "repair" (windows XP)
it seems to do the trick (yet that basically does what I did at the
command line other than it probably causes FF to go offline I guess
which was suggested earlier as a solution).
JB
Further to the above, I was testing something different than what you
are testing. You are correct in what you stated about being able to
ping the domain to get the IP (after you renamed the host file to
ensure it didn't get used by ping to resolve anything) and then
dropping that IP in the address bar. But there must be an easier way
to clear the DNS and cache from FF rather than having to get a domain
name's IP and using that to navigate to it.
JB
-Erik
--
hackerkey://v4sw5hw2ln3pr5ck0ma2u7LwXm4l7Gi2e2t4b7Ken4/7a16s0r1p-5.62/-6.56g5OR
Yes, I misunderstood (see my posting shortly after the one above to
which you replied). I understand very well what ping does and when
one might use it. Misunderstood what you were suggesting vs what the
OP was trying to accomplish.
JB
Thanks Terry,
I'm using this one at present:
@echo off
cls
goto toggleRename
:toggleRename
If Not %winbootdir%'==' Set HostsOff=%windir%\NOHOSTS
If %OS%'==Windows_NT' Set HostsOff=%SystemRoot%\system32\drivers\etc\NOHOSTS
If %HostsOff%'==' goto noIdeaOfOS
If Not %winbootdir%'==' Set HostsOn=%windir%\HOSTS
If %OS%'==Windows_NT' Set HostsOn=%SystemRoot%\system32\drivers\etc\HOSTS
If %HostsOn%'==' goto noIdeaOfOS
If Not Exist %HostsOff% goto deActivate
goto Activate
goto end
:deActivate
color 4F
if not exist %HostsOn% goto noHostsFile
ren %HostsOn% NOHOSTS
echo.
echo ммммммммммммммммммммммммммммммммммммммммммммммммм
echo н кФФФПо
echo н HOSTS FILE BLOCKING IS NOW DE-ACTIVATED Г X Го
echo н РФФФйо
echo. ппппппппппппппппппппппппппппппппппппппппппппппппп
echo.
echo. Advertising will be visible; Parasite protection off!
echo Renamed from HOSTS to NOHOSTS
echo.
goto end
:Activate
color 1F
if not exist %HostsOff% goto noHostsFile
ren %HostsOff% HOSTS
echo.
echo ммммммммммммммммммммммммммммммммммммммммммммммммм
echo н кФФФПо
echo н HOSTS FILE BLOCKING IS NOW ACTIVATED Г ћ Го
echo н РФФФйо
echo. ппппппппппппппппппппппппппппппппппппппппппппппппп
echo.
echo. Advertising will be hidden; Parasite protection on!
echo Renamed from NOHOSTS to HOSTS
echo.
goto end
:noIdeaOfOS
echo Sorry Unsupported OS.
goto end
:noHostsFile
cls
echo.
echo ммммммммммммммммммммммммммммммммммммммммммммммммм
echo н кФФФПо
echo н ERROR NO HOST FILES FOUND ! Г ! Го
echo н РФФФйо
echo. ппппппппппппппппппппппппппппппппппппппппппппппппп
echo .
echo Couldn't find "HOSTS" or "NOHOSTS" in the folder
echo.
echo please check that the HOSTS file is in this folder
echo thanks..
:end
set HostsOff=
set HostsOn=
pause
exit
Note my earlier post when I used ipconfig/flusdns along with flushing
the routing table and the arp table but that didn't help either.
JB