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/, but it actually has the URL http://localhost/project1/.
This can cause problems when accessing server variables. How do I fix this?
Okay, I had this problem. So, I troubleshooted the problem and traced it to an actual solution, NOT A HACK.
The SOLUTION :
WAMP Settings
, Add localhost in URL
DONE. The remainder is FYI of how and why.
Note: localhost/myproject.php or myproject.php. Although the solution was already accepted, I saw some posts that got me confused. The accepted solution is based on a single project wrt different server applications, based on the OP's specific question, and how to influence that single project in question. But all the other solutions are hacks and don't really answer the solution to the OP's question, but do bring up a good point about the URL. So, according to the other "solutions", here is how to toggle the localhost reference in the URL. Hence my additional solution added to the mix.
This is a toggle switch.
Troubleshooting Process (no hacking involved):
Let's peek at the index.php
Let's look at the config file. Note the variables and Array?
Here is the array. A variable used earlier. Let's see... Oh, it tells us where and what to do.
As noted in the SOLUTION:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With