I have successfully set the DocumentRoot for a given server names:
<VirtualHost *:80>
DocumentRoot "/var/www/html/domain1"
ServerName www.domain1.com
ServerAlias *.domain1.com
#Other directives here
</VirtualHost>
I can't seem to figure out, how to move the subfolders ie."www.domain1.com/contact-us" so it presents index.html located in "/var/www/html/domain1".
I tried adding the alias for the /contact-us in the VirtualHost instructions:
<VirtualHost *:80>
DocumentRoot "/var/www/html/domain1"
ServerName www.domain1.com
ServerAlias *.domain1.com
#Other directives here
Alias /contact-us /var/www/html/domain1
</VirtualHost>
It doesn't work as expected.
I am thinking doing this via .htaccess in the subfolder for the domain1. How would I go around redirecting everything after the domain name to the index.html?