
我正在嘗試訪問test.sample.local
,但電腦無法解析 URL。我將 URL-IP 添加到etc/hosts
文件中,但仍然無法訪問它。
我可以透過IP存取目的地。
電腦是 Windows 8.1,我在檔案中輸入以下內容hosts
:
test.sample.local 176.235.11.11
我要怎麼解決這個問題?
答案1
C:\Windows\System32\drivers\etc
Windows 主機檔案 ( )的格式為
127.0.0.1 myWebsite.com
而不是您聲稱輸入的內容:
test.sample.local 176.235.11.11
所以將其交換為
176.235.11.11 test.sample.local
這應該有幫助。
有關更多資訊(以及為您編輯的有用工具),請參閱 TheWindowsClub:Windows 主機文件。