Page Not Found

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post please read how to get help
Post Reply
XPomJohn
Level 1
Level 1
Posts: 2
Joined: Sun Feb 19, 2017 2:05 am

Page Not Found

Post by XPomJohn » Sun Feb 19, 2017 2:18 am

I have installed Apache2 & PHP5 and placed 2 test files, index.php & page2.php in /var/www/html. Both files have identical content:-
[quote ]<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>page 2</title>
</head>
<body>
<h4>Hello World</h4>
<br>
<?php echo "<h3>well hello again</h3>" ?>
<a href = "/var/www/html/page2.php">Next Page</a>
</body>
</html> [/quote]
Index.php loads into Firefox via localhost OK but when I click on the link to Page2 I get the Error Message "NOT FOUND the requested url /var/www/html/page2.php was not found on this server"
There are no entries in the Apache2 error log.
Help Please

grumpy_geek
Level 2
Level 2
Posts: 80
Joined: Tue Jan 03, 2017 3:50 am
Contact:

Re: Page Not Found

Post by grumpy_geek » Sun Feb 19, 2017 7:16 am

XPomJohn wrote:2 test files, index.php & page2.php in /var/www/html

Code: Select all

<a href = "/var/www/html/page2.php">Next Page</a>
With both files in the same folder, the reference should read:

Code: Select all

<a href="./page2.php">Next Page</a>
Cf. HTML (& PHP) basics

XPomJohn
Level 1
Level 1
Posts: 2
Joined: Sun Feb 19, 2017 2:05 am

Re: Page Not Found

Post by XPomJohn » Tue Feb 21, 2017 1:55 am

Thanks for your help. That's solved one problem I'm sure there's going to be more

Post Reply

Return to “Other topics”