I am building a localhost website using xampp as my web server. The problem I am having is when I click on a link on my webpage it doesn’t navigate to it.
Current URL:
localhost/builds/index/
HTML Link:
<a href="localhost/builds/projects/30-11-11.php">30th November 2011</a>
Expectation:
localhost/builds/projects/30-11-11.php
Reality:
localhost/builds/index/localhost/builds/projects/30-11-11.php
Note:
I am aware that hard-coding anything is never a good idea. I have previously tried to use a PHP variable, but if hard-coding the link does not work I don’t expect the soft-code to work at the moment either.
If url doesn’t start with a schema (like http:// or https://) browser will threat it a relative and append to current directory.