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 trialBrendan O'Brien
9,066 PointsMoved shirts4Mike to subfolder, not working now
Hello everyone, I'm working through the PHP development and I've worked on cleaning up the URL section. Now I wanted to change the folder MAMP uses and I moved the shirts4mike site to the new folder.
Now the site isn't working properly. I think it's a problem with the BASE_URL element created in the config.php
3 Answers
Logan R
22,989 PointsI would try changing Base_URL from "/" to "/treehouse/". I would also try doing the same for the Root_PATH.
I hope this helps!
Logan R
22,989 PointsCould you please give the url for your Base_URL? Where is the directory? Is it "/localhost/foldername/project.php"? More information would be nice, lol.
Thanks!
Brendan O'Brien
9,066 PointsThanks, this is the config file I have:
<?php
define("BASE_URL","/");
define("ROOT_PATH",$_SERVER["DOCUMENT_ROOT"] . "/");
Yeah the site was just in localhost before, then I moved it to localhost/treehouse/
Brendan O'Brien
9,066 PointsL R, Hey you were right. I was just making some mistakes in the folder names.
Thanks for the help.
Logan R
22,989 PointsGlad it worked and I could help :)
If you have any more questions, always feel free to ask!
Brendan O'Brien
9,066 PointsBrendan O'Brien
9,066 PointsTried it out, and it didn't seem to make a difference. It was my understanding too that by setting the base url and root path like that then it should be able to be moved to any folder... no?