모두Zend Framework - 다른 모듈의 IndexController로 리디렉션
다음 프로젝트는 Zend의 mvc 프레임 워크에 있습니다. 애플리케이션에 액세스 할 때 사용자가 "default"모듈에서 IndexController로 이동하는 대신 "mobile"모듈로 리디렉션하도록합니다. 어떻게해야합니까?
-billingsystem
-application
-configs
application.ini
-layouts
-scripts
layout.phtml
-modules
-default
-controllers
IndexController.php
-models
-views
Bootstrap.php
-mobile
-controllers
IndexController.php
-models
-views
Bootstrap.php
Bootstrap.php
-documentation
-include
-library
-logs
-public
-design
-css
-images
-js
index.php
.htaccess
내 index.php에 다음 코드했습니다 컨트롤러 내에서
require_once 'Zend/Application.php';
require_once 'Zend/Loader.php';
$application = new Zend_Application(
APPLICATION_ENV,
APPLICATION_PATH . '/configs/application.ini'
);
$application->bootstrap()->run();
각 컨트롤러를 변경하는 대신 index.php와 같이 전역 적으로 수행 할 방법이 없습니까? – Jake
Dispatcher가 실행되기 전에 완료되도록'Zend_Controller_Plugin'에서 수행하십시오. –