Well, this is a very old and dirty trick to change 'localhost' (i.e. to some other name. Many of you are aware of this trick. In Windows, go to "C:\Windows\system32\drivers\etc". You'd find a file named "hosts" (without quotes, of course). Open it with your favourite text editor. Find the lines:       localhost
Just after that line, add the following line:  the_name_you_like
Of course, replace "the_name_you_like" with the name of your choice. That's it! Next time you type "the_name_you_like" in the address bar and hit enter enter, you'd be redirected to How cool is that! Also if you want to run multiple domains under one machine head to this article.


blog comments powered by Disqus
Blogger Yoosuf said...
its only for windows man!
Blogger Abhisek said...
Blogger Jon said...
On any unix-like OS (SYSV or BSD variant, Linux, OS X, and so on), it's in /etc/hosts, which is where Windows got it from. You should NEVER do this. Instead, you should add the alias to the line: localhost my_localhost_alias_here another_alias