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 trialMostafa Akram
Courses Plus Student 9,541 PointsURL still not found Slim
I am working on my local host on my mac
i have done all the steps by adding .htaccess file to the directory of my project
and added the code from Get Started of the Slim Framework v2
and when typing localhost/myproject/hello/name still didn't get anything and receive Not Found on server error
although i have done it on the workspace and it worked fine
itangsanjana
2,685 PointsSounds like .htaccess problem. what is your base path? try this inside your get() before return line.
print_r($request->getUri()->getBasePath());
if the path not equal '/'
than add RewriteBase /to/your/path
in .htaccess.
HTH
PS. I am under Slim 3
Mostafa Akram
Courses Plus Student 9,541 PointsMostafa Akram
Courses Plus Student 9,541 Pointsalthough
$app->get('/',function() {});
worked fine but$app->get('/contact',function(){});
did not work