how to configure htaccess in zend framework

不羁岁月 提交于 2019-12-13 09:14:30

问题


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 error display 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

Not Found

The requested URL /hotelrwanda/public/users/list was not found on this server.

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]

回答1:


Possible duplicate of Zend mod rewrite not working

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.

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.



来源:https://stackoverflow.com/questions/10260795/how-to-configure-htaccess-in-zend-framework

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!