I have two Zend framework applications called finance and fleet. Both of them have the same .htaccess file as indicated below
RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ index.php [NC,L] I have created two virtual hosts called fleet.local and finance.local. This is my fleet.local file:
# APACHE CONFIGURATION FOR THE fleet.local APPLICATION <VirtualHost *:80> ServerName fleet.local DocumentRoot /home/user/fleet/public SetEnv APPLICATION_ENV dev <Directory /home/user/fleet/public> DirectoryIndex index.php AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> DeflateCompressionLevel 9 And this is my finance.local file:
# APACHE CONFIGURATION FOR THE fincance.local APPLICATION <VirtualHost *:80> ServerName fincance.local DocumentRoot /home/user/fincance/public SetEnv APPLICATION_ENV dev <Directory /home/user/fincance/public> DirectoryIndex index.php AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> DeflateCompressionLevel 9 When I want to use finance I will say http://finance.local and when I want to use fleet I will say http://fleet.local.
Now what I want to do is have a single virtual host called companyX.local and if I want the finance application, I will just type http://companyX.local/finance and http://companyX.local/fleet for my fleet application. How do I go about doing this?