Running Slim 4 in a subdirectory
If you want to run Slim 4 in a subdirectory of your website, then you have a few things you need to do. Let's consider the situation: Your main website is in the directory /var/www/html and is accessed at https://example.com/. You want your new Slim 4 app to be in the directory /var/www/html/myapp and to be accessed at https://example.com/myapp. Your Slim 4 index.php file is stored in /var/www/html/myapp. There are two things you need to… continue reading.