So I want things like:
sub1.example.com -> example.com/sub1
sub1.example.com/path -> example.com/sub1/path
sub2.sub1.example.com -> example.com/sub1/sub2
sub2.sub1.example.com/path -> example.com/sub1/sub2/path
usedsub.example.com -> usedsub.example.com
I’ve added this DNS record:
This is all working and requests get to the server for all subdomains.
The next step is how to make the server handle these redirects? What’s the best way? Is this any use?:
In the mean time, the ‘bad_httpd_conf’ error message is displayed for unused subdomains, which I much prefer to undefined behaviour based on the NXDOMAIN handling of the visitor’s ISP / DNS resolution service.
Really, I think this should either be default for unused subdomains, or there should be an easy web panel setup for it.