Zend Framework Error : The requested URL was not found

余生长醉 提交于 2019-12-13 00:29:58

问题


I'm trying to set up my zend framework application on this host but I'm getting a Requested URL not found error:

The application isn't at the root level i.e its in a folder like: www.mysite.com/zendapp/public

The error says that it can't locate the index.php file even though the url given in the erro message is correct.

Is this an htaccess issue? The homepage opens fine - the issue arises when I click on any link. Here is my htaccess file:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

URL rewrite is enabled on the host.


回答1:


Two things to check:

  1. RewriteBase in your .htaccess
  2. baseUrl property of the front controller


来源:https://stackoverflow.com/questions/9884989/zend-framework-error-the-requested-url-was-not-found

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