Monday, June 4, 2012

/etc/hosts for windows

Programmers test their web sites by calling the links http://IP/~username when the dns is not transferred completely for a domain.

But some times this function will not work due to the following reasons.
1. Some hosting providers enabled "mod_userdir" on their apache tweak for security reasons.
2. Once you transferred your domain to another server and your domain is installed with some scripts like wordpress,joomla etc( Because their db's host name should be yourdomainname.com not IP/~username

In that time you can edit the following file in your windows machine
c:\WINDOWS\system32\drivers\etc\hosts 
as
IP_current_server   domainname.com

No comments:

Post a Comment