Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Development Tools Using PHP with MySQL Filtering Input for Queries Preparing SQL Statements

Jose Colindres
Jose Colindres
3,179 Points

individual shirt pages not working

When Im on the shirts.php or index.php page and click on a individual shirt, the individual shirts does not work. I used the zip file from this project. I did not see a .htaccess file in it. Should i have mod_rewrite activated??? Because I just get that the page cant be found.

i had to add the .htaccess file to the project folder with some mods on my shirt pages paths in the .htaccess file to get those pages to work:

<p>RewriteRule ^shirts/([0-9]+)/$ /shirts4mike/shirts/shirt.php?id=$1</p>

1 Answer

I am experiencing the same issues. Project files downloaded, navigating to a particular shirt page (ie. /shirts/101) results in a page not found. Up to Part 3 of this course I wasn't experiencing any issues. I am using MAMP, and the httpd.conf file doesn't appear to offer any sort of rewrite line. I've also moved all site files to the htdocs folder on the MAMP App to ensure there wasn't an issue with a lengthier file path and I am still encountering the same problem. Any thoughts?