
Project Links Do Not Work on WAMP Server
Problem:
Project links from localhost on the WAMP homepage redirect to "Page not found" errors.
Solution:
You need to create a virtual host in WAMPServer to properly route project links.
Creating a Virtual Host in WAMPServer
- Open the Virtual Host Configuration Utility: In the WAMPServer homepage, click "Tools" and select "Add a Virtual Host."
Fill in the Virtual Host Details:
- Virtual Host: Enter a name for your project (e.g., project1.dev).
- Document Root: Specify the directory where your project's files are located (e.g., C:\projects\project1).
- Server Name: Enter the virtual host name you want to use in your browser (e.g., project1.dev).
- Restart the DNS Cache: Right-click the WAMPServer icon, select "Tools" and "Restart DNS."
- Verify the Virtual Host: Check the "Your Virtual Hosts" section in the WAMPServer homepage. The virtual host you created should be listed.
- Test the Link: Use the virtual host name (e.g., project1.dev) in your browser's address bar to access your project. It should load without errors.
Additional Notes:
- This method is for WAMPServer 3 and later. For older versions, consider using the "manual" approach outlined in the answer text.
- Always create a backup of important configuration files before making changes.
- Disable the "My Projects" menu in WAMPManager for better organization with virtual hosts.