|
@@ -66,22 +66,19 @@ class Bootstrap extends Bootstrap_Abstract |
|
@@ -66,22 +66,19 @@ class Bootstrap extends Bootstrap_Abstract |
66
|
{
|
66
|
{
|
67
|
$hostParts = explode('.', $dispatcher->getRequest()->getServer('HTTP_HOST', ''));
|
67
|
$hostParts = explode('.', $dispatcher->getRequest()->getServer('HTTP_HOST', ''));
|
68
|
$level = count($hostParts) - 1;
|
68
|
$level = count($hostParts) - 1;
|
|
|
69
|
+
|
69
|
/* 根据域名的级别,设置默认的模块、控制器、方法 */
|
70
|
/* 根据域名的级别,设置默认的模块、控制器、方法 */
|
70
|
$module = 'Index';
|
71
|
$module = 'Index';
|
71
|
$controller = 'Index';
|
72
|
$controller = 'Index';
|
72
|
$action = 'Index';
|
73
|
$action = 'Index';
|
73
|
- $levelNum = 2;
|
|
|
74
|
- if(APPLICATION_ENV == 'developer') {
|
|
|
75
|
- $levelNum = 3;
|
|
|
76
|
- }
|
|
|
77
|
- // 三级域名
|
|
|
78
|
- if ($levelNum === $level) {
|
74
|
+
|
|
|
75
|
+ // 二级域名
|
|
|
76
|
+ if (2 === $level) {
|
79
|
$subDomain = strval($hostParts[0]);
|
77
|
$subDomain = strval($hostParts[0]);
|
80
|
switch (strtolower($subDomain)) {
|
78
|
switch (strtolower($subDomain)) {
|
81
|
- case 'www':
|
|
|
82
|
- case 'web': // 老版(到频道选择)
|
|
|
83
|
- case 'new': // 原新版(到男生首页)
|
|
|
84
|
- $controller = 'Boys';
|
79
|
+ case 'www': // 主站
|
|
|
80
|
+ case 'new': // 原新版
|
|
|
81
|
+ case 'dev': // 开发环境
|
85
|
break;
|
82
|
break;
|
86
|
case 'search': // 搜索
|
83
|
case 'search': // 搜索
|
87
|
$controller = 'Search';
|
84
|
$controller = 'Search';
|