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


Where I should add .htaccess file?

I created .htaccess file. Where should I add it, on the document root or on htdocs folder? On the document root, I have composer.json, composer.lock etc and on htdocs, I have index.php.

2 Answers

I added it on htdocs folder and I changed the file name to .htaccess.txt to .htaccess and it worked.

Peter Hatzer
Peter Hatzer
20,837 Points

Hi Kohane,

The .htaccess file should be added to root of your website folder.