如何在 Zend Framework 中配置 HTaccess


how to configure htaccess in zend framework

我无法访问其他模块(页面)。我只能访问公共目录 http://localhost:88/hotelrwanda/public。我将项目置于开发模式并启用错误显示,但什么都没有。如果我想访问以下 url http://localhost:88/hotelrwanda/public/users/list,以下是我收到的消息

未找到

在此服务器上找不到请求的 URL/hotelrwanda/public/users/list。

这是我的访问文件;

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]

Zend mod 重写的可能重复项

不起作用

我相信问题是AllowOverride设置为none您正在使用的网络目录,这意味着.htaccess文件不会被处理。 您必须编辑httpd.conf并设置AllowOverride All

还要确保为每个模块创建一个引导程序文件,因为除非您有模块引导程序,否则不会为模块设置自动加载。