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

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 Points

Slim - Can it only be deployed to the root directory of a web server?

I want to deploy a website produced using the Slim PHP Framework to my web server.

But it needs to be to a sub domain on my own server and in a separate directory

e.g. https://www.projects.jonniegrieve.co.uk/slim/src/public.

As you can see Slim is successfully loading the first page based on the project src/public directory. But no other links worked. I've tried tinkering with the template paths and the routes themselves but no matter what I've tried so far the rendering does not work.

It works well enough on localhost and via the PHP localhost development server.

Is it just a case that websites with Slim need to live on the root directory of a web server?

Thanks :)

I don't know, but I have a feeling you would be more likely to get an answer to a question like this on stackoverflow. Good luck.