Is it possible to create a router in Zend Framework that can match hostnames using a wildcard or regular expressions (no matter how many parts are in the hostname)?
I can create a route that matches based on a hostname
$externalHostname = new Zend_Controller_Router_Route_Hostname(
'ext.mysite.com', array(
'module'=> 'external',
));
But what if I wanted to achieve something like this:
$externalHostname = new Zend_Controller_Router_Route_Hostname(
'ext.*', array(
'module'=> 'external',
));
where any hostname that starts with "ext." gets routed to the "external" module, independent of how many subdomain levels the hostname has, so
- ext.mysite.com
- ext.test.mysite.com
would both match.
How can that be achieved?