I installed XAMPP and created simple website (a folder 'website' in htdocs folder) that contains a link <a href="/info">Info</a>
.
If I type localhost/website
in browser I get a default homepage. But if I click the link, it goes to localhost/info
(which does not exist), instead of localhost/website/info
. I could use <a href="/website/info">
, but it would be weird to refactor all the links when changing site name.
So what is the usual setting or solution that people uses when developing sites in XAMPP?
You have to change DocumentRoot in httpd.conf file to folder. In your example where you have website directory.
For more sites, you have to have more hosts and then set virtual hosts. Here is link how to do that in Win. But point is the same in all OS.
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