【发布时间】:2016-02-29 11:10:09
【问题描述】:
对于使用 Zend 框架的 Social Engine 4。 我想在子域下显示用户配置文件。所以,http://domain.com/profile/username 将是 http://username.domain.com
我该怎么做。我已经有一个扩展名,可以将http://domain.com/profile/username 转换为http://domain.com/username 这是它的代码。
$route = array(
'user_profile' => array(
'route' => ':id/*',
'defaults' => array(
'module' => 'user',
'controller' => 'profile',
'action' => 'index'
),
'reqs' => array(
'id' => "\b.+"
)
)
);
Zend_Registry::get('Zend_Controller_Front')->getRouter()->addConfig(new Zend_Config($route));
是否可以将其更改为适用于子域?如果是,我该怎么做?
提前谢谢你。
【问题讨论】:
标签: php zend-framework zend-framework2 regex-negation socialengine