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
Graham Kite
Courses Plus Student 8,123 Pointsenhancing a simple php .htaccess problem
I have my path set localhost/treehouse/enhance everything works fine for the php.
however in stage three the .htaccess is RewriteEngine On RewriteRule ^shirts/$ /shirts/shirts.php
when I try this in my folder the rewrite does not work. What do I need to use?
I am assuming it is sending the rewrite to the actual localhost folder?
Even though the root path is set, I don't understand why this would not work
2 Answers
Graham Kite
Courses Plus Student 8,123 PointsI fixed it by setting the path /treehouse/enhance/ this works but is there a better/more correct/best practice way?
Brendan O'Brien
9,066 PointsI'm wondering if there is a better way too. I did some digging on stack overflow and someone suggested using
RewriteBase /yourfolder/
It kind of worked, but not really. There are still some strange glitches.