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

Moved 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

I would try changing Base_URL from "/" to "/treehouse/". I would also try doing the same for the Root_PATH.

I hope this helps!

Tried 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?

Could 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!

Thanks, 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/

L R, Hey you were right. I was just making some mistakes in the folder names.

Thanks for the help.

Glad it worked and I could help :)

If you have any more questions, always feel free to ask!