WAMP: Missing http://localhost/ in urls , wrong wamp projects links

后端 未结 12 2220
野趣味
野趣味 2020-12-03 03:56

I have a problem with Wamp which never happened to me before, cannot find what\'s wrong. I have a few projects located in my www folder ( running windows 7 ).

My ho

相关标签:
12条回答
  • 2020-12-03 04:24

    WampServer Version 3.1.0 64bit In Wampmanager.conf you will find a line:

    urlAddLocalhost = "off"
    

    Change it to "on" Thats it!

    0 讨论(0)
  • 2020-12-03 04:25

    In Wamp server 3.0.0:

    Open wamp/www/index.php and head to line number 33 and replace off by on.

    if(!empty($wampConf['urlAddLocalhost']) && $wampConf['urlAddLocalhost'] !== "on")

    You may now uncheck the "Add localhost in url" in the Wamp menu.

    0 讨论(0)
  • 2020-12-03 04:26

    In WAMPSERVER 3.1.x

    Open wamp/www/index.php

    Go to line number 33

    Change this line:

    $suppress_localhost = ($wampConf['urlAddLocalhost'] == 'off' ? true : false);
    

    To:

    $suppress_localhost = ($wampConf['urlAddLocalhost'] == 'on' ? true : false);
    

    Save and close the file.

    OR

    Right click on system tray Wampserver icon and hover on,

    Click Wamp Settings option

    After that choose this: Add localhost in url

    0 讨论(0)
  • 2020-12-03 04:27

    After thorough research, I found out the solution which worked for me as well..

    open wamp/www/index.php.
    

    Change this line:

    $suppress_localhost = true;
    

    To :

    $suppress_localhost = false;
    
    0 讨论(0)
  • 2020-12-03 04:27

    In the latest version

    CHANGE THIS

    $suppress_localhost = ($wampConf['urlAddLocalhost'] == 'off' ? true : false);
    

    TO THIS

    $suppress_localhost = ($wampConf['urlAddLocalhost'] == 'off' ? false : false);
    
    0 讨论(0)
  • 2020-12-03 04:30

    Adding Localhost in url is not a suggested by wamp, wamp expect that each project contains a virtualhost.This provides a level of control for framework development. So for instance if your project is stackone, you need to create a virtual host for that called stackone:How to create a virtual host?

    --Create a directory/folder in wamp64/www (example wamp64/www/projectone)

    --Go to kickstart you wamp server and type localhost on your browser

    --At the bottom left you should see add local virtual server. fill in the project name,(e.g projectone),fill in the path.(e.g c:\wamp64\www\projectone).click start creation.

    --You will need to restart DNS. Right click on the notiication icon of wamp, hover on tools, you should see restart DNS. You can now copy your files to the directory you created. I added some images below (wamp 3.0.6)

    Adding Virtual Host,Restarting DNS

    0 讨论(0)
提交回复
热议问题