Here is a scenario of what I am trying to do.
Folder A has folders B and C. Folder B has D, E and index.html. Folder C has index.html
I declared folder B as my DocumentRoot. Declared an Alias for Folder C to point it to /A/C. I want apache to serve index.html in B for any requests coming in to B (/B/D or /B/E or /B/** should return /B/index.html)
Here is the sample virtual host config
<VirtualHost *:8080> ... DocumentRoot "/usr/local/var/www/A/B" Alias "/C" "/usr/local/var/www/A/C" <Directory "/usr/local/var/www/A"> ....
RewriteEngine On RewriteCond %{ENV:REDIRECT_STATUS} !200 RewriteRule ^/B/.+ /B/ [PT] ....
<VirtualHost *:8080>
...
DocumentRoot "/usr/local/var/www/A/B"
Alias "/C" "/usr/local/var/www/A/C"
<Directory "/usr/local/var/www/A">
....
</Directory>
RewriteEngine On
RewriteCond %{ENV:REDIRECT_STATUS} !200
RewriteRule ^/B/.+ /B/ [PT]
....
</VirtualHost>
With this configuration, I am running in to redirect loop.