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 trialClay Kinder
14,519 PointsInternal Server Error after downloading this video's project files
There were some other threads about this, but they didn't help me so I figured I'd bring this issue to someone's attention again.
I downloaded the project files and moved them into my htdocs after unpacking them. My htdocs looks like this:
contact (folder)
css (folder)
favicon.ico
img (folder)
inc (folder)
index.php
receipt (folder)
shirts (folder)
.htaccess
The other threads seemed to indicate that this was an issue with the .htaccess file so here is what mine contains:
RewriteEngine On RewriteRule ^shirts/$ /shirts/shirts.php RewriteRule ^shirts/([0-9]+)/$ /shirts/shirt.php?id=$1 RewriteRule ^receipt.php$ /receipt/ [R=301] RewriteRule ^contact.php$ /contact/ [R=301] RewriteRule ^shirts.php$ /shirts/ [R=301] RewriteRule ^(shirts/[0-9]+)$ /$1/ [R=301]
RewriteCond %{QUERY_STRING} ^id=([0-9]+)$ RewriteRule ^shirt.php$ /shirts/%1/? [R=301]
Any and all help would be greatly appreciated.
2 Answers
Clay Kinder
14,519 PointsI followed your advice and cut all of it, replacing it line by line. I didn't change anything, but by the time I pasted all of it in, it was all working. Hooray for strange solutions!
Thank you!
Dermot Condron
4,010 PointsI had the same problem on my localhost using wamp server. The problem for me was related to the rewrite rules in the .htaccess file. By default the apache software is not set to use rewrite rules so if you enable this module in apache it can read the htaccess file. In wamp go to the server icon at the bottom right menu on your screen where date,time etc is displayed. Select Apache> Apache Modules and scroll down until you see rewrite_module and enable it. This should eliminate the internal server error.
shezazr
8,275 Pointsshezazr
8,275 PointsSome simple steps to verify where things are going wrong: (check if your website works after each suggestion)
if the error is on .htaccess file, I would recommend copying all of the htaccess file content into a blank document and then putting it back line by line to see which line has the error..