Fix Broken Project Links in WampServer

Newer versions of WAMP may throw a “Site can’t be reached” page after clicking on a localhost project. The issue is that the URL sets the project name as the root, rather than localhost (e.g. http://project/). This was originally meant to avoid root directory issues when dealing with PHP queries.

Fix #1

Create a Virtual Host for each of your projects. A Virtual Host will set your project name as the host, server name, and document root, avoiding directory hierarchy issues, and also provides a cleaner URL.

Fix #2

Another way is to manually navigate the browser URL to the full path of the project (e.g. http://localhost/project), rather than clicking the project link under Your Projects.

Fix #3

In the www folder (C:\wamp64\www), open index.php in a text editor.

Find:

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

Change to:

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