Accustomed to see http://localhost in the local domain name test, want to change the way of writing, for example, want to become http://www.111cn.net, but Web Access is still the original http://localhost content, how to do it?
You can modify a file on this computer to implement it.
The following path in the system disk
| The code is as follows |
Copy Code |
C:windowssystem32driversetc |
Find the "Hosts" file, right-click the way to select a text file, you can see the following:
| The code is as follows |
Copy Code |
| # Copyright (c) 1993-1999 Microsoft Corp. # # is ' A sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file contains the mappings's IP addresses to host names. Each # entry should is kept on a individual line. The IP address should # is placed in the ' the ' the ' the ' corresponding host name. d The host name should is separated by at least one # spaces. # # Additionally, comments (such as) may Inserted on individual # lines or following the machine name denoted by a ' # ' symbol. # # for example: #< br> # 102.54.94.97 rhino.acme.com # source Server # 38.25.63.10 x.acme.com # x client Host |
127.0.0.1 localhost
See, at the bottom of the line there are
127.0.0.1 localhost
Do you know how to do it?
is to add a new line under this line, modify the localhost to the desired domain name, as follows
127.0.0.1 www.111cn.net
It should be noted that the "127.0.0.1" and "www.111cn.net" between the tab interval open
Want to add what domain name and then go down to add, it is so simple.
After you add it, save it and then use Www.111cn.net to access your local site.