How can the index.html file be served from a sub directory of the DocumentRoot
without using system level links?
For example:
- Let the document root of an apache 2.4 virtual host be
dirA
- Let the the base url (VirtualHost) be
http://test.local/
- Let index.html reside in
dirA/dirB/
- Let
http://test.local/
(the base URL) resolve the index.html file (not give a listing of directories).
I've been attempting to use mod rewrite to do this but am unfamiliar with regex and with mod rewrite. The rule I have that works is RewriteRule . /html/index.html [L]
but this is unacceptable since any URL will resolve to test.local/html/ (where the index.html file lives).
What is needed is for the exact URL corresponds to the document root find the index.html file in a sub directory of the document root (namely "html") instead of the document root --without using system level symbolic linking (ie: entirely from within Apache).