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

Rewrite Rule Problems

Strange, is not working for me, i already enabled the module in Wamp, but still no sucess.

The struture i have the website is www/shirts4mike/

I tryed this way:

RewriteEngine On RewriteRule ^shirts/$ /shirts/shirts.php

and this way

RewriteEngine On RewriteRule ^shirts4mike/shirts/$ /shirts4mike//shirts/shirts.php

but no sucess, anyone had the same problem in Wamp?

2 Answers

Samiruddin Syed
Samiruddin Syed
3,136 Points

Please avoid the space after the "$" in the link to avoid any syntax problems.

Well, one thing i motive is if i have the files in a folder the htacess filé shouldnt be in the same folder but in the root of localhost, so the rewrite rule i should add te name of the folder "shirts4mike".../shirts/... But Still cant make This to redirecionar to shirts.php