首頁  >  文章  >  後端開發  >  zend framework url路由无效,该怎么解决

zend framework url路由无效,该怎么解决

WBOY
WBOY原創
2016-06-13 13:27:05789瀏覽

zend framework url路由无效
大虾们,帮帮忙,是什么原因呀?
zend framework 路由无效
localhost/test/test/test 访问报404错误。
localhost/index.php/test/test/test 可以正常显示。

LoadModule rewrite_module modules/mod_rewrite.so 这个也设置
index.php 也设置默认页面了。

------解决方案--------------------
如果

localhost/index.php/test/test/test 可以正常显示。

但是
localhost/test/test/test 访问报404错误。


是不是.htaccess放的位置不对呢?
和index.php是在一个地方的?
内容是
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]


如果都正常。就不知道是什么原因了、
不是配置的问题。只能说明代码有问题了


陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn