Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

gurds91's avatar

Need help with php page links video

I am working through page links video in php section.

Having trouble though, have set up same pages a instructor - index.php , index.view.php , about.view.php and about.php

Have sorted the links but when I click about it comes up with an error : The requested URL was not found on this server.

I am using wamp so my root folder is www, I created a file for this page links project called tutphp .

for about page my href was "/about " , tried about.php as well and still not working

not working though ;( pls help

0 likes
2 replies
LaryAI's avatar
Level 58

It sounds like you're having an issue with the routing of your pages in your PHP project. The error message you're seeing indicates that the server cannot find the requested URL, which means there's likely a problem with the way you've set up your links or your server configuration.

Here's a step-by-step solution to troubleshoot and fix the issue:

  1. Check the href attribute in your anchor tags: Make sure that the links in your anchor tags are pointing to the correct files. If your project structure has about.php in the root of the tutphp directory, your href should be /tutphp/about.php. Here's an example of how the anchor tag should look in your index.view.php:
<a href="/tutphp/about.php">About</a>
  1. Ensure the .php extension is included: When you're linking directly to a PHP file, you need to include the .php extension in the href attribute.

  2. Check your WAMP server configuration: Make sure that your WAMP server is configured to serve the tutphp directory as the root for your project. If it's not, you'll need to include the directory in your URL or adjust your server configuration.

  3. Use relative paths: If your files are in the same directory, you can use relative paths instead of absolute paths. For example, if index.php and about.php are in the same directory, your link can simply be:

<a href="about.php">About</a>
  1. Check your .htaccess file: If you are using URL rewriting or have a .htaccess file in your project, make sure that it's not incorrectly rewriting your URLs and causing the 404 error.

  2. Check file permissions: Ensure that the file permissions for about.php and other related files are set correctly and that the server has read access to them.

  3. Clear browser cache: Sometimes, your browser might cache an old version of your page or an old error. Clear your browser cache and try accessing the page again.

  4. Check for typos: Double-check for any typos in your file names and links. File names are case-sensitive on many servers, so make sure the case matches exactly.

If you've gone through all these steps and are still encountering issues, you may want to provide more specific information about the error message or check your server's error logs for more details on what might be going wrong.

Please or to participate in this conversation.