ZF2移动子域路由

时间:2013-05-02 15:57:27

标签: mobile zend-framework2 zend-route

我在localhost上有我的网站(在ZF2中),我需要2个网址(我得到)

本地主机/部位 m.localhost / site(mobile)

但是,当我尝试在module.config.php中获取移动子域(m.localhost / site)的url时不起作用。我做了那个

return array(
    'router' => array(
        'routes' => array(
            'mobile' => array(
                'type' => 'hostname',
                'options' => array(
                    'route' => m.localhost',
                    'defaults' => array(
                        'controller' => 'Mobile\Controller\Index',
                        'action'     => 'index',
                    ),
                ),
            ),...

我读了一些例子 http://briangallagher.ie/2013/01/29/hostname-subdomain-routing-and-urls-using-zf2/ How to route multi subdomain with zend router hostname

但对我不起作用。任何帮助?感谢!!!!

pd:对不起我的英文

0 个答案:

没有答案
相关问题