'HTML href tag not redirecting to .php file

<li><a href="test.php">A Very Long Link Text</a></li>

I have the following code and when I click on it it is not redirecting to test.php, can some one help on this. It redirects to page with 500 error



Solution 1:[1]

Make your html code looks like this. As a href needs http:// to show the text as hyperlink.

<ul>
   <li>
      <a href="http://localhost:2112/test.php">A Very Long Link Text</a>
      <a href="../test.php">A Very Long Link Text</a>
   </li> 
</ul>

Then it will work. See below:

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Nejc Galof