Hello all,
Its been years since i was stuck enough with anything to ask for help, but
this is driving me nuts!
My router config:

<?xml version="1.0" encoding="UTF-8"?>
<routes>
    <user>
        <type>Zend_Controller_Router_Route_Hostname</type>
        <route>:username.example.com</route>
    </user>
    <defaultmodule>
        <type>Zend_Controller_Router_Route_Module</type>
        <abstract>On</abstract>
        <defaults>
            <module>default</module>
        </defaults>
    </defaultmodule>
    <default>
        <type>Zend_Controller_Router_Route_Chain</type>
        <chain>user, defaultmodule</chain>
    </default>
    <pages>
        <route>pages/:url</route>
        <defaults>
            <module>default</module>
            <controller>pages</controller>
            <action>view</action>
        </defaults>
    </pages>
</routes>

Bootstrap:

protected function _initRoutes() {
        $this->bootstrap('frontController');
        $front = $this->frontController;
        $router = $front->getRouter();
        $config = new
Zend_Config_Xml(APPLICATION_PATH.'/configs/routes.xml');
        $router->addConfig($config);
    }

When visiting anything other than /pages everything works fine, but when i
go to say demo.example.com/pages/whatever, the router does not register the
default route so the application does not get the "username" parameter.
I have tried chaining pages to default route every way possible, tried
moving the pages around in the config it breaks as well.
Your help would be much appreciated!
-- 
View this message in context: 
http://n4.nabble.com/Zend-Router-with-Hostname-and-other-routes-tp1599492p1599492.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to