1. 程式人生 > >【local host】修改以測試還未上線的網站

【local host】修改以測試還未上線的網站

Simply put, the Hosts file is similar to an address book. Exactly like the example above, when you type an address like www.domain.com into your web browser, the Hosts file on your own computer is referenced to see if you have the IP address for that web site. If you do, then your computer will use that IP it has on file locally to “call” and the corresponding web site opens. If not, your computer will ask the DNS Server belonging to your Internet Service Provider for the associated IP address for the corresponding web site and connects you to that web site. The majority of the time, you will not have all the IP Addresses of all the web sites from the entire Internet in your “address book”. You will probably have very few (if any) entries within your Local Hosts file. Therefore, most of the time your computer will ask for the IP addresses of web sites you wish to visit from your ISP.