I'm having trouble getting Slim to run in my user account on the university's web server. I'm pretty sure I'm just missing a step in my .htaccess
file.
I have placed my Slim application in /home/smithj/public_html/CS371/MySlimApp
My .htaccess
file looks like this:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . /~smithj/CS371/MySlimApp/public/index.php [L]
Requests to the app are correctly being redirected to index.php
; but, only the root route works. I added a default handler and I see that the path given to the router begins with the root of my user account instead of the root of the app. Specifically, when trying to access http://www.mega.edu/~smithj/CS371/MySlimApp/public/testMe
, $request->getURI()->getPath()
is /~smithj/CS371/MySlimApp/public/testMe
instead of just /testMe
as expected.
What else do I need to do to correctly configure the root of the app?