Reputation:
Is it possible to create a "wildcard" on ServerName attribute on a VirtualHost statement?
I currently have something like this:
<VirtualHost *:80>
ServerName testhost
DocumentRoot "C:/xampp/htdocs/testhost/"
</VirtualHost>
What I would like to is something like this:
<VirtualHost *:80>
ServerName $serverRequest
DocumentRoot "C:/xampp/htdocs/" + $serverRequest
</VirtualHost>
So I could redirect all similar hosts to a same-name directory. Is it possible?
Upvotes: 2
Views: 2666
Reputation: 14149
I think that you're after Dynamically Configured Mass Virtual Hosting.
Upvotes: 2