I have a problem in creating a modular application with zend framework, I followed more tutorials and modules studied several times, but I always get the same error.
The structure of my application is in the following figure.
+Site
application
+configs
+modules
admin default+Bootstrap.php
docs
library
public
test
In each module I have a class that extends the class Zend_Application_Module_Bootstrap, and are respectively:
- Admin_Bootstrap
- Default_Bootstrap
My application.ini file is as follows:
[production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
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 = 0
;module support
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.modules[] = ""
resources.frontController.params.prefixDefaultModule = "1"
resources.frontController.defaultModule="default"
;end module support
[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
If I try to get to the url http://localhost/site.it/public/ it's ok, but if i try to get to the url http://localhost/site.it/public/admin I get the error The requested URL http://localhost/site.it/public/admin was not found on this server.
The file .htaccess is composed of:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
What's wrong?
AllowOverridedirective. - Tim Fountain