当前位置:网站首页>Domain name mapping to specified IP

Domain name mapping to specified IP

2022-06-12 08:51:00 junxuezheng


In some cases , We want to access... Through the domain name ip, It can be solved by .

1、ip And the domain name

Refer to my other blog :ip、DNS、 domain name 、URL、hosts

2、 How to achieve ip And domain name binding

2.1、 programme : modify hosts

There are other options , For example, using open source tools :SwitchHosts, No introduction here , We use Baidu by ourselves .

2.2、hosts Location

hosts The piece is in “c:\windows\system32\drivers\etc”
 Insert picture description here

2.3、 modify hosts

127.0.0.1 kinglog.com

 Insert picture description here

2.4、 Verify that the settings are successful

- ping kinglog.com

 Insert picture description here

3、 Can't find hosts file

  • 3.1、hosts The file is hidden
     Insert picture description here
  • 3.2、 It was deleted by mistake
    step1、 In the catalog “C:\WINDOWS\system32\drivers\etc\” newly build host.txt
    step1、 hold host.txt Rename it to host, Click on “ Start – function "
ren C:\WINDOWS\system32\drivers\etc\hosts.txt C:\WINDOWS\system32\drivers\etc\hosts
原网站

版权声明
本文为[junxuezheng]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/163/202206120842242349.html