Welcome to the Treehouse Community
Looking to learn something new?
crystal oakley5,709 Points
Cleaning URLs with Rewrite Rules
The challenge asks to add a rewrite rule to add a trailing slash. I can not figure this out.
RewriteRule ^(flavors/[0-9]+)$ /$1/
RewriteEngine On RewriteRule ^flavors/$ /all_flavors.php RewriteRule ^(flavors/[0-9]+)$ /$1/ [R=301]
Hi Crystal! I did the RewriteRule section not too long ago and it was really hard for me to wrap my head around. You almost have it. Just remove the /[0-9]+ part and it works. So like this:
RewriteRule ^(flavors)$ /$1/ [R=301]
I hope this helps!