esta es mi configuración:
application.ini
Código:
[production]
resources.modules[] = ""
phpSettings.display_startup_errors = 1 ;cambiar 0
phpSettings.display_errors = 1 ;cambiar 0
includePaths.library = APPLICATION_PATH "/../library"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
appnamespace = "Application"
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.frontController.params.displayExceptions = 1 ;cambiar 0
resources.frontController.params.prefixDefaultModule = "1"
autoloaderNamespaces[] = "My"
resources.view.helperPath.My_View_Helper = "My/View/Helper"
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"
default.resources.layout.layoutPath = APPLICATION_PATH "/modules/default/layouts/scripts/"
default.resources.layout.layout = layout
admin.resources.layout.layoutPath = APPLICATION_PATH "/modules/admin/layouts/scripts/"
admin.resources.layout.layout = layout
resources.db.adapter = pdo_mysql
resources.db.params.host = localhost
resources.db.params.username = root
resources.db.params.password = admin
resources.db.params.dbname = cms
[staging : production]
[testing : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
[development : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
resources.frontController.params.displayExceptions = 1
bootstrap.php
Código PHP:
<?php
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
protected function _initPlugins(){
$this->bootstrap('frontController');
$plugin = new My_PluginLayout();
$this->frontController->registerPlugin($plugin);
}
protected function _initRouters()
{
$fronController = Zend_Controller_Front::getInstance();
$router = $fronController->getRouter();
$router->addRoute('custom-default',
new Zend_Controller_Router_Route('/:url', array(
'url'=>':url',
'module' => 'default',
'controller' => 'index',
'action' => 'index'
))
);
$router->addRoute('custom-default2',
new Zend_Controller_Router_Route('/:preurl/:url', array(
'preurl'=>'',
'url'=>'',
'module' => 'default',
'controller' => 'index',
'action' => 'index'
))
);
$router->addRoute('custom-default3',
new Zend_Controller_Router_Route('/:preurl/:url/:u', array(
'preurl'=>'',
'url'=>'',
'u' =>'',
'module' => 'default',
'controller' => 'index',
'action' => 'index'
))
);
/* FIN router module default */
}
}