Apache server alias wildcard

Something I've learnt recently that I might be the last to know but you can use wildcards (*) in the ServerAlias in Apache. In the past I've done something along the lines of

ServerName example.com ServerAlias www.example.com www.example.co.uk example.co.uk

Really all you need to do is:

ServerName example.com ServerAlias *.example.*

Hope this helps someone else


comments powered by Disqus