Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialdaniwao
13,125 PointsLinking shirts.php correctly but getting 404 error
A simple link to the shirts.php page but when I'm pressing the link, I'm getting a 404 error. Not sure why, this seems like an easy thing. Going over my code, I don't see any errors.
Here's my shirts.php <?php include('inc/header.php'); ?>
<div class="section page">
<h1>Mike’s Full Catalog of Shirts</h1>
</div>
<?php include('inc/footer.php'); ?>
And here's my header.php from which I'm linking the shirts.php to through the <a href> tag <html> <head> <title><?php echo "Shirts 4 Mike;" ?></title> <link rel="stylesheet" href="css/style.css" type="text/css"> <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Oswald:400,700" type="text/css"> <link rel="shortcut icon" href="favicon.ico"> </head> <body>
<div class="header">
<div class="wrapper">
<h1 class="branding-title"><a href="./">Shirts 4 Mike</a></h1>
<ul class="nav">
<li class="shirts"><a href="shirts.php">Shirts</a></li>
<li class="contact"><a href="contact.php">Contact</a></li>
<li class="cart"><a href="#">Shopping Cart</a></li>
</ul>
</div>
</div>
<div id="content">
1 Answer
daniwao
13,125 PointsDummy mistake. I accidently created shirts.php within my inc folder and not outside of it. Even still I could just reference it differently if i wanted to keep it in there. But I took it out and put it in my home directory. LOL.