问题描述
我无法访问其他模块(页面).我只能访问公共目录 http://localhost:88/hotelrwanda/public.我将项目置于开发模式并启用错误显示但没有.如果我想访问以下 url http://localhost:88,我会收到以下消息/hotelrwanda/public/users/list
I cannot access other modules(pages). I can access only public directory http://localhost:88/hotelrwanda/public. I put the project into development mode and enable errordisplay but nothing. Here is what message I get if I want to access to for the following url http://localhost:88/hotelrwanda/public/users/list
未找到
在此服务器上找不到请求的 URL/hotelrwanda/public/users/list.
The requested URL /hotelrwanda/public/users/list was not found on this server.
这是我的 htaccess 文件;
Here is my htaccess file;
SetEnv APPLICATION_ENV development
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
推荐答案
我认为问题在于您正在使用的 Web 目录的 AllowOverride
设置为 none
,这意味着 .htaccess
文件不会被处理.您必须编辑 httpd.conf
并设置 AllowOverride All
.
I believe the issue is that AllowOverride
is set to none
for the web directory you are using which means the .htaccess
file will not be processed. You will have to edit httpd.conf
and set AllowOverride All
.
还要确保为每个模块创建一个 Bootstrap 文件,因为除非您有模块引导程序,否则不会为模块设置自动加载.
Also make sure you create a Bootstrap file for each module, as the autoloading is not set up for modules unless you have a module bootstrap.
这篇关于如何在zend框架中配置htaccess的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!