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 Redirecting Old Web Addresses

Leigh Maher
Leigh Maher
21,830 Points

Now /shirts.php redirects to /shirt/?

In this video we create a redirect to send visitors that land on /shirts.php to /shirts/. We also set up another 2 redirects for receipts.php and contact.php. Both of these work, but the shirts.php one redirects me to /shirt/.

Even when I remove the redirect it still sends me to that url.

I've also noticed that when I enter /shirt.php, I get a page not found error. In an earlier lesson we set up a redirect in shirt.php to redirect any traffic that doesn't include an product id to /shirts/ but this doesn't seem to be working now.

I wonder if these 2 issues are linked, and what the solution might be?

Thanks.