I use a custom framework which has many sub applications. I want to assign a domain to each application folder but ran into an issue.
Apache vhosts config
<VirtualHost *:80>
ServerName app1.com
DocumentRoot /var/www/framework/public/app1
</VirtualHost>
<VirtualHost *:80>
ServerName app2.com
DocumentRoot /var/www/framework/public/app2
</VirtualHost>
/var/www/framework/.htaccess
DirectorySlash Off
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*?)/?$ index.php?_ROUTE=$1 [QSA]
/var/www/framework/index.php
<?php
exit('WORKED!');
//Route request
//...
Everything's works fine except that it tries to use the index.php file in the document root such as "/var/www/framework/public/app1/index.php" when actually I want to use the index file "/var/www/framework/index.php".
So how would I get it to use the index.php file two directories above or relative to the .htaccess location?