Currently, I have a VirtualHost defined like so:
<VirtualHost *:80>
ServerName mydomain.com
ServerAlias otherdomain.com
DocumentRoot /var/www/project/
</VirtualHost>
How can I make an Alias that only affects the otherdomain.com
domain:
Alias /sub /var/www/other
So that:
http://otherdomain.com/sub -> /var/www/other
http://mydomain.com/sub -> /var/www/project/sub
The VirtualHost in question is not that simple in reality, so I'd rather not make separate VirtualHosts just for this. Are there any conditional expressions or similar that I can use inside the VirtualHost? Something along the lines of:
<VirtualHost *:80>
...
<If ServerName=otherdomain.com>
Alias /sub /var/www/other
</If>
</VirtualHost>