WAMP - Remove localhost from project URL

前端 未结 16 1700
暖寄归人
暖寄归人 2020-12-02 11:01

The URLs of my projects in WAMP are not resolving as I\'d expect. For example, I\'d expect the project in the folder c:\\wamp\\www\\project1 to have the URL http://project1/

16条回答
  •  执念已碎
    2020-12-02 11:18

    Your wamp seems to be configured to run a website on the normally non-existant domain helloworld.

    add:

     127.0.0.1    helloworld
    

    inside this file: c:\windows\system32\drivers\etc\hosts

    Make sure you start your text editor with administrator privileges to be able to edit that file.

    This will tell your computer that the otherwise non-existant domain helloworld should be resolved to your loop back address.

提交回复
热议问题