I read through the other post but none seemed to answer the question i have been having. Is it possible to have wildcard Subdomains of wildcard Domains (even if its just for subdomains and not sub-subdomains) like: foo.example.local. I already have example.local working but i can't figure out how to get foo.example.local to grab the files from the folder /sub/foo within the /example folder. My config at this moment (httpd-vhost.conf):
NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot "C:/xampp/www" ServerName localhost ServerAlias localhost </VirtualHost> <Virtualhost *:80> VirtualDocumentRoot "C:/xampp/www/%-2" ServerName domain.local ServerAlias *.local <Directory "C:/xampp/www/*"> Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Order allow,deny Allow from all Require all granted </Directory> </Virtualhost> <Virtualhost *:80> VirtualDocumentRoot "C:/xampp/www/%-2/sub/%-3" ServerName sub.domain.local ServerAlias *.*.local <Directory "C:/xampp/www/*/sub/*"> Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Order allow,deny Allow from all Require all granted </Directory> </Virtualhost> What currently happens is that the foo.example.local simply goes to the example folder and not to the example/sub/foo folder which is what i want it to do.
Oh and i have already enabled: LoadModule vhost_alias_module modules/mod_vhost_alias.so within httpd.conf
Host file contains both lines:
- 127.0.0.1 example.local
- 127.0.0.1 foo.example.local