Help to configure Wamp Server

I'm having a problem on WAMP server, where I can't access my project from LocalHost when I click directly on the project name, only if I type "localhost/Project Name".

Does anyone have any tips to be able to configure?

Author: Icaro Rego Fernandes, 2017-03-22

1 answers

Inside the WWW folder of wamp, you will find a file called index.php, open it.

In line 338 you will find the following

$projectContents .= '<li><a href="'.($suppress_localhost ? '//' : '').$file.'">'.$file.'</a></li>';

If you can't find search for project projectContents in the editor of your choice to find the right line, because depending on the version you can change the line.

To fix this problem we must add the front of HTTP: / / the word localhost, because this line is responsible for mounting the url in the browser, because the way Wamp mounts the url only with the name of your project for example, and in this way it will not open our file, showing non-existent page error.

So to solve this problem we must leave this line like this:

$projectContents .= '<li><a href="'.($suppress_localhost ? '//localhost/' : '').$file.'">'.$file.'</a></li>';

Ready, your localhost should already be accessing your jobs by clicking on the folder.

Now in the Wamp/scripts / folder we have a file called refresh.php, open it and on line 651 you will find the following Command:

$myreplacesubmenuProjects .= 'Type: item; Caption: "'.$projectContents[$i].'"; Action: run; FileName: "'.$c_navigator.'"; Parameters: "// '.$projectContents[$i].'/"; Glyph: 5';

To correct, we must do the same in front of // in this way:

$myreplacesubmenuProjects .= 'Type: item; Caption: "'.$projectContents[$i].'"; Action: run; FileName: "'.$c_navigator.'"; Parameters: "//localhost/'.$projectContents[$i].'/"; Glyph: 5 ';

Restart wamp services for Warranty only, and if all goes well, your projects can be accessed through localhost.

 1
Author: Everton Figueiredo, 2017-03-22 16:38:51