Match multiple domains with zf2 router

249 views Asked by At

I need to match 2 different domains with my ZF2:

  • www.gamempire.it is the base
  • www.rankempire.it have to match to only a specific controller

So I tried adding this to my router configuration, but with no success (it match to my default controller):

'rankempire' => array(
    'type'    => 'Hostname',
    'options' => array(
        'route'    => 'www.rankempire.it',
        'defaults' => array(
            'controller' => 'rank',
            'action'     => 'index',
        ),
    ),
),

How to solve the problem?

Thanks

1

There are 1 answers

0
Oscar Fanelli On

Solved putting the hostname route configuration to the end of the router