Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Here's basically what you want, in INI format:</p> <pre><code>routes.b2b.type = "Zend_Controller_Router_Route_Hostname" routes.b2b.route = "sales.sitename.com" ; you could specify a default module (or anything) to use for the whole ; route chain here, like so: ; routes.b2b.defaults.module = "default" routes.b2b.chains.signup.type = "Zend_Controller_Router_Route_Static" routes.b2b.chains.signup.route = "/signup" routes.b2b.chains.signup.defaults.controller = "index" routes.b2b.chains.signup.defaults.action = "signup" routes.b2b.chains.anotherroute.route = "/something/:foo" ; etc, etc. routes.b2b.chains.anotherroute.defaults.action = "foo" routes.b2b.chains.anotherroute.defaults.controller = "index" routes.b2b.chains.anotherroute.defaults.foo = "bar" routes.b2b.chains.anotherroute.reqs.foo = '[a-z]+' </code></pre> <p>This will give you the following routes: <code>b2b-signup</code>, and <code>b2b-anotherroute</code>.</p> <p>Here's some important notes on route chaining:</p> <p>When chaining routes together, the parameters of the outer route have a higher priority than the parameters of the inner route. Thus if you define a controller in the outer and in the inner route, the controller of the outer route will be selected.</p> <p>Parent / child chained route names are always concatenated with a dash! So, like in the example above, <code>b2b.chains.signup</code> becomes a route named <code>b2b-signup</code> (which you can use for URL assembly, etc).</p> <p>You can keep chaining! Chains of chains can have chains.</p> <p>Children of chained routes do not work with wildcards. See <a href="http://framework.zend.com/issues/browse/ZF-6654" rel="noreferrer">#ZF-6654</a>. Here's <a href="http://www.noginn.com/2009/02/04/revisiting-hostname-routing-with-the-zend-framework/" rel="noreferrer">blog post</a> that talks about why that may not be a big deal.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload