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 Building Websites with PHP Slim Basics & Twig Templates Including & Running Slim

.htaccess help

Okay, so I'm using Apache 2.4 and PHP 7 to create my own local server to complete this tutorial. Further, I'm also using Slim 3.0, which only further complicates things--but shouldn't be an issue with this particular problem. I've followed Hampton's directions to a T (with Slim 3.0 corrections), but I am only getting results when I type in the following URLs:

http://localhost/index.php/ http://localhost/index.php/contact

Now this would appear to work fine, but my CSS and src references break because I'd have to add the extra "../" to reference them correctly. This would also cause problems in the future when a theortical project went into production. Does anyone know what I can do?

P.S. I've tried "RewriteBase /" in my .htaccess file to no avail.