I need to setup Apache so it deals with 2 different disk locations and maps different sites dinamically based on the subfolder on the URLs:
http://localhost1/site1.com/
http://localhost1/site2.com/
http://localhost2/site3.com/
...
That will map respectively to:
C:\folderOne\site1.com\public_html
C:\folderOne\site2.com\public_html
C:\folderTwo\site3.com\public_html
...
I've found examples that use mod_vhost_alias, mod_alias and mod_rewrite for different things, but have not been able to implement what I need.
Thanks.
To redirect the sites dynamically, you could try the following:
In Apache's sites-available folder, you should have a file called 000-deafult.conf, or something similar. You need to edit this file to do the redirecting.
However, the only way you can redirect to another sub folder dynamically is if your domain have something that indicates the subfolder to use, like to sort the domains according to TLD's.
Therefore I would suggest something like:
And so forth.
Hope this answers your question.