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.
Mark Lovett15,853 Points
1. Why arent links working in the project files?
I loaded the files in htdocs. Seems like the htaccess file is missing. It should appear in Sublime text editor but it's not there.
The only links that arent working are related to the shirts. The shirts listing page address is http://localhost:8888/shirts/shirts.php This address http://localhost:8888/shirts/ gives me an index listing with 3 links.
All the shirt detail pages like http://localhost:8888/shirts/101 return 404's
Im using this project folder : project03-stage04-shirts4mike
Im working in PHP with mySQL Filtering Input for Queries.
Andrew Dushane9,264 Points
.htaccess is normally hidden by default. There are various ways to see/edit hidden files depending on your operating system. A quick google search ie 'Windows 7 show hidden files' should give you the ability to see if .htaccess exists and has the correct content.
Mark Lovett15,853 Points
The missing project file htaccess file was the problem. I imported the new tables into phpMyAdmin and it's all working now. Issue closed.
Michael Dowell2,390 Points
I found the .htaccess file at this link: https://teamtreehouse.com/library/using-php-with-mysql/using-relationship-tables-in-mysql/understanding-relationship-tables
click "downloads". Unzip the file.
The .htaccess folder is in the project files, but it is hidden.
To be able to see the hidden .htaccess folder, you must make hidden files visible. I'm on a mac, so this is how I do it.
To view hidden files on a mac, open terminal and paste this line of code (then press enter): defaults write com.apple.finder AppleShowAllFiles -boolean true ; killall Finder
To prevent hidden files from being seen, paste this line of code into terminal (then press enter): defaults write com.apple.finder AppleShowAllFiles -boolean false ; killall Finder
Hope this helps.