I'd like to redirect all subdomains *.local to their sub dirs, for example:
test.local/ --> /files/test/data/
Here's my vhost file:
<VirtualHost *:80>
ServerName local
ServerAlias *.local
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.* [NC]
RewriteCond %{HTTP_HOST} ^([^\.]+)\.local
RewriteCond /files/%1/data -d
RewriteRule ^(.*) /mv/$1/data
</VirtualHost>
The trouble is that's not working, I get a file not found error.
Any ideas?