I have a bunch of domains passing to a Resin cluster through an HAProxy. The idea is, when I receive a 404 because of a non-existent subdomain, I want to redirect it to the existing page, like this:
test123 is a non-existing subdomain, so if I make the request http://test123.mydomain.com/rents-house-near-the-lake.html I want to redirect it to http://www.mydomain.com/rents-house-near-the-lake.html
(Where www is an existing subdomain)
This will be possible? Thanks!!