dns - Zend Hostname Route dispatching defined controller / action -


when domain requested, display page genereted defined controller / action. tried using hostname route (in case requesting www.some-page.de should dispatch transportaction in indexcontroller), this:

$hostnameroute = new zend_controller_router_route_hostname(     'www.some-page.de',     array(         'controller' => 'index',         'action'     => 'transport'     ) );  $plainpathroute = new zend_controller_router_route_static('');  $router->addroute('transport', $hostnameroute->chain($plainpathroute)); 

apparently doing wrong, because isn't working (instead indexaction of indexcontroller being dispatched). hints or ideas how can achieve this?

i've got - it's simple , hope practice:

in plugin's routeshutdown hook check domain name (using $_server['http_host']) , if desired domain, set action name using following code:

$request->setactionname('transport'); 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -