-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 A hostname route is just there to match a hostname, not a path. See the (1.8) documentation about the ChainRoute. ................................... : ___ _ ___ ___ ___ _ ___ : : | \ /_\ / __| _ \ _ (_) \ : : | |) / _ \\__ \ _/ / | |) | : : |___/_/:\_\___/_| |_|_\_|___/ : :........:........................: : Web : http://www.dasprids.de : : E-mail : [email protected] : : Jabber : [email protected] : : ICQ : 105677955 : :........:........................:
José de Menezes Soares Neto schrieb: > 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/ <http://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/ <http://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é -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAknyCVgACgkQ0HfT5Ws789DZmwCfX7ZQWG07ShxLmq217JrM8gum OrQAoNL6LiI+Jr6+4ncxgPqDNOHcgrrK =0fke -----END PGP SIGNATURE-----
