Windows: How to use hosts file with path?

心不动则不痛 提交于 2020-01-25 00:12:26

问题


This works:

127.0.0.1       www.somesite.com

But not this:

127.0.0.1/somepath/www       www.mysite.com

What am I doing wrong? Is it possible to map a full path like this? If not, what is the easiest way to accomplish what I want to do here?


回答1:


The simple answer is that you can't use the hosts file to redirect to specific URLs. It can only be used to map hostnames to IP addresses.



来源:https://stackoverflow.com/questions/16476400/windows-how-to-use-hosts-file-with-path

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!