>> GreenByte.info By Nick Tong (quiksilv) | Supported by: TalkWebSolutions.co.uk

Quickly editing your hosts file

Thanks to Adrian Lynch (who may be blogging this soon) here is a quick way to edit your hosts files for windows.

Open up notepad and enter the following text:

notepad C:\WINDOWS\system32\drivers\etc\hosts
ipconfig /flushdns

Save this as hosts.bat into your \windows\system32 folder. Then you can quickly edit your hosts file by clicking start | run and enter 'hosts' this will open up your hosts file. A even quicker way is to press the Windows key and then press 'R' and enter 'hosts'.

Kudos to Adrian for pointing this out to me.


 
Comments
Adrian Lynch's Gravatar Waaaaaaay ahead of you ;)

http://www.adrianlynch.co.uk/post.cfm?postID=15

I was also wondering if flushing the DNS cache was of any use. I suppose it can't hurt to do it.
# Posted By Adrian Lynch | 17/12/07 09:22 | Report abusive comment
Nick Kwiatkowski's Gravatar You shouldn't have to flush the DNS for local HOST changes. Local (HOSTS file) enteries never get cached, they actually get hit for
every lookup, so they are always fresh. Your browser may cache them (Internet Explorer), but that is about it. The Flush DNS
option is really only used if you want to blow away your cache for your primary and secondary name server on your TCP/IP stack.
# Posted By Nick Kwiatkowski | 17/12/07 11:18 | Report abusive comment
Michael Sharman's Gravatar Nice tip guys, but surely nothings quicker than a shortcut to your HOSTS file in your quicklaunch/panel?
# Posted By Michael Sharman | 17/12/07 20:38 | Report abusive comment
Adrian Lynch's Gravatar Yeah but, the quick launch menu is for special stuff ;)
# Posted By Adrian Lynch | 18/12/07 06:29 | Report abusive comment
Matty's Gravatar Nice walkthough. I've ben searching for this info for ages.
# Posted By Matty | 25/07/08 03:37 | Report abusive comment
BlogCFC was created by Raymond Camden. This blog is running version 5.5.1.