PDA

View Full Version : How to edit hosts file?! explained here.


Dichotomy
03-09-2006, 09:48 AM
well, when you are moving sites over from one host to other, you are required to move content and trades and prepare everything on new server before you can actually switch domains over. to do that, you have to edit hosts file on your local computer so you can access scripts and files without changing actual DNS over...
here are what you have to do assuming you have win200/XP system (if you have *nix or *bsd*, you should be smart enough to know where to change things)

so, lets assume we want to move oldhairygaymovies.com from one server to another and lets assume mathew allready moved over all your files and installed new scripts :D

1. you have to know your new servers IP address (lets pretend its 192.168.99.2)
1. open explorer and go to c:\windows\system32\drivers\etc folder
2. open for editing hosts file (without extension) - choose Notepad for editing from application list
3. add following line to it after this one 127.0.0.1 localhost

192.168.99.2 oldhairygaymovies.com

of course, replace IP and domain with ones you want to move over.
4. save file

now, open 2 new browser tabs or windows
in the first one put in www.oldhairygaymovies.com and in the other one put in JUST oldhairygaymovies.com

whoala! in one browser you have your existing server (one with www) with all your current trades and in other you have your new setup (one without www). now you can move trades, add content and make sure that everything is ready for switching DNS records!

*** in some cases you may require to disable your antispyware and before editing hosts file make it available for writing by clicking right mouse button, choosing properties and unselecting "read only" and pressing apply. in some cases before it all works you may need to restart your machine.

phew. now I wont have to explain it all over again and again and again :D

Mathew
03-09-2006, 09:51 AM
under unix you change /etc/hosts, am I smart enough :confused: :graucho: :haha:

great that you explained it here. I think that it will come handy to many webmasters.

kloot
03-09-2006, 10:37 AM
http://www.oldhairygaymovies.com/ doesn't work btw :D

Dichotomy
03-09-2006, 01:07 PM
http://www.oldhairygaymovies.com/ doesn't work btw :D

should I register it and set up for your viewing pleasure? :p

Mathew
03-09-2006, 01:34 PM
just edit the hosts file as explained above and enter
127.0.0.1 www.oldhairygaymovies.com

and that should work :D

Dichotomy
03-09-2006, 01:41 PM
just edit the hosts file as explained above and enter
127.0.0.1 www.oldhairygaymovies.com

and that should work :D

ROFL!!!
there is no place like home!!! :haha:

kloot
03-09-2006, 04:00 PM
Hmmm, I tried that, but now my Norton Anti-virus says I am infected with 2smartassesfromriga.download.trojan and I must format c: immediately :D

Mathew
03-09-2006, 06:31 PM
that's a famous latvian virus you should do what it says :graucho: