Hello my friends.

I have a little problem with zend route, but I am sure you will help me, let
me explain...

*My application without route:*

http://www.mydomain.com/onemodule/onecontroller/oneaction/variable1/value1
/variable2/value2

Works fine!

*My application with route:*

http://www.value1.mydomain.com/value2

Gives me an error (see below).

*The route code I used:*

// Host routes

$hostUrl = new Zend_Controller_Router_Route_Hostname(
    'www.:variable1.mydomain.com/:variable2',
    array('module'    => 'onemodule'),
    array('variable1' => '([a-z0-9]+)'),
    array('variable2' => '([a-z0-9]+)')
);

// Module routes


$router->addRoute('hostUrl', $hostUrl->chain(
    new Zend_Controller_Router_Route_Static(
        '',
        array(
            'controller' => 'onecontroller',
            'action' => 'oneaction'
        )
    )
));

*Error message I am getting:*

Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with
message 'Invalid controller specified (value2)'

Regards,

José

Reply via email to