zend framework url路由无效

lipingzhy 2012-06-15 09:29:14
大虾们,帮帮忙,是什么原因呀?
zend framework 路由无效
localhost/test/test/test 访问报404错误。
localhost/index.php/test/test/test 可以正常显示。

LoadModule rewrite_module modules/mod_rewrite.so 这个也设置
index.php 也设置默认页面了。
...全文
158 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
lipingzhy 2012-06-16
  • 打赏
  • 举报
回复
都是正常的了。
只能再看看了。应该是可以确定当localhost/test/test/test的时候,跟本就没有进入引导文件index.php
coder 2012-06-16
  • 打赏
  • 举报
回复
如果

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]


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


lipingzhy 2012-06-16
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 的回复:]
要有.htaccess
要加入AllowOverride all

http://blog.csdn.net/mengxiangbaidu/article/details/7045432
[/Quote]

你说的这两点都有
lipingzhy 2012-06-16
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 的回复:]
要有.htaccess
要加入AllowOverride all

http://blog.csdn.net/mengxiangbaidu/article/details/7045432
[/Quote]
你说的这两点都有的呀?
coder 2012-06-16
  • 打赏
  • 举报
回复

要有.htaccess
要加入AllowOverride all

http://blog.csdn.net/mengxiangbaidu/article/details/7045432

4,251

社区成员

发帖
与我相关
我的任务
社区描述
国内外优秀PHP框架讨论学习
社区管理员
  • Framework
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧