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 trialBecky Christofferson
15,047 PointsAdding the shirt conditional gives me a server error of 500 and I can't access any pages.
When I add the conditional, I can no longer access my localhost. Code is below.
RewriteCond %{QUERY_STRING} ^id=([0-9]+)$
RewriteRule ^shirt.php$ /shirts/%1/? [R-301]
Anyone with similar issues?
1 Answer
Chris Shaw
26,676 PointsHi Becky,
The only issue I see is your redirection statement is formatted incorrectly, currently you have an hyphen where an equals sign should be which will cause an internal server error as Apache can't parse it.
RewriteRule ^shirt.php$ /shirts/%1/? [R=301]
Becky Christofferson
15,047 PointsBecky Christofferson
15,047 PointsThanks Chris!