I currently use mod_vhost_alias with a wildcard ServerAlias to catch all subdomains for the domain I use to hold development versions of websites.
This works great, but I reach an issue when I need to test websites that have 'm.' subdomain flexibility for mobile versions. In a live environment, this subdomain would still use the same directory as the normal domain, but I am unable to achieve this in development.
Example:
website.devdomain.com
goes to /var/www/website.devdomain.com
, and m.website.devdomain.com
goes to /var/www/m.website.devdomain.com
, but preferably this should go to /var/www/website.devdomain.com
Is there a way to make sub-subdomains go to their parent's directory? The current VirtualDocumentRoot snippet I use is VirtualDocumentRoot /var/www/%0/
I can create custom document roots on a per-site basis to achieve this, but if there is an automated way with VirtualDocumentRoot it would be much more practical.