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 trial

PHP Enhancing a Simple PHP Application Cleaning URLs with Rewrite Rules Introducing Rewrite Rules

Surendra Kulkarni
Surendra Kulkarni
6,826 Points

code challenge 4 of 4

what is wrong with

RewriteEngine on
RewriteRule ^flavors/$ /flavors/all-flavors.php```

```htaccess
RewriteEngine On
RewriteRule ^flavors/$ /flavors/all_flavors.php

2 Answers

Alex Heil
Alex Heil
53,547 Points

hey Surendra Kulkarni ,

you're actually pretty close with your code but you're targetting the all_flavors file in a subfolder (the last part of your second line, /flavors/all_flavors.php ). from the task we know that it's not in a folder but directly in the root of the site. if you change that path your code will work fine, like this:

RewriteEngine On
RewriteRule ^flavors/$ /all_flavors.php

hope that helps and have a nice day ;)

Alex Heil
Alex Heil
53,547 Points

you're welcome - great to hear this helped you out ;)