Running a slim app in a subdirectory to the main domain


#1

Hi there,

I’ve seen topics on this issue but none of the suggestions have directly applied to my case.

I’m trying to run a slim app in a subdirectory of the domain.
Example: domain is example.com and has a wordpress install. I want example.com/app to be the slim app.

Here’s the directory structure:
/var/www/html/index.php is wordpress’s index.php and the docroot is set to /var/www/html
/var/www/html/app is a sym link to /home/something/myapps/slim_app/public

Now. Visiting example.com/app runs slim fine which then figures I haven’t logged in and redirects me to /login but unfortunately it’s not example.com/app/login but example.com/login which is something completely different.

I’ve tried setting RewriteBase to /app in slim’s public dir .htaccess but that achieves nothing.
I have an AllowOverride all directive for /var/www/html/app and I know .htaccess is being read but slim’s redirects are borked.

I’d like to solve his without manually adding a prefix to all my routes cause that’s a bit ugly.
Any suggestions would be greatly appreciated. Thanks!