Zend框架:“未找到url”只有索引控制器,只有小写 [英] Zend framework: "url not found" only with index controller, only if lowercase
问题描述
这是我的问题:
我有一个在aruba / linux上运行的zend应用程序。
它似乎工作得很好。
我有一些控制器:index,user,video,...
$ b b
如果我键入http://www.foo.com/public/我可以达到我的索引控制器和索引操作。
如果我输入http://www.foo.com/public/user/register,我可以到达我的用户控制器并注册操作。
if我输入http://www.foo.com/public/index/index服务器返回url未找到:(
但最奇怪的是,如果if我输入http://www.foo.com/public/Index/index(注意大写我)它工作。
我尝试一个解释,但我没有找到它:(
你能帮助我吗?
。
PS:在我的计算机上的语言环境中工作良好
UPDATE
我没有注意到这个下午的行为:如果我调用一个不存在的控制器zend显示自定义错误页面,指定的控制器使用索引控制器我获得404:url未找到...
我绝对不知道该怎么做...请帮助我!
RE-UPDATE
更改默认控制器从'索引'到'foo',我已经重命名所有文件,类和文件夹正确和应用程序工作正常,没有这个愚蠢的错误...
这是一种魔法...
我有同样的问题。
问题出在我的虚拟主机设置中。
我在虚拟主机的目录中有以下设置:
< Directory / home / koen / zend / ZendCMS / public>
选项索引FollowSymLinks MultiViews ExecCGI
AllowOverride所有
订单拒绝,允许
允许所有
< / Directory>
当我在MultiViews前放一个破折号并修复问题。
像这样:
< Directory / home / koen / zend / ZendCMS / public>
选项索引FollowSymLinks -MultiViews ExecCGI
AllowOverride所有
订单拒绝,允许
允许所有
< / Directory>
希望有助于
This is my problem:
I have a working zend application running on aruba/linux. It seems to work well.
I have some controllers: index, user, video, ...
if i type "http://www.foo.com/public/" i can reach my index controller and index action. if i type "http://www.foo.com/public/user/register" i can reach my user controller and register action.
if i type "http://www.foo.com/public/index/index" the server return url not found :(
But the most strange thing is that if i type "http://www.foo.com/public/Index/index" (pay attention on the UPPERCASE I) it works.
I try an explanation, but i don't found it :(
Can you help me??
Thanks in advance, Gabriele.
PS: in locale on my computer it works well
UPDATE
a behavior that i didn't notice this afternoon: if i call a controller that doesn't exist zend show the custom error page with write that there isn't the specified controller. With the index controller i obtain instead 404: url not found...
i absolutely don't know what to do... please help me!!
RE-UPDATE
I've changed the default controller from 'index' to 'foo', i have renamed all files, classes and folder correctly and the application works well, without this stupid error...
It seems that the 'index' word creates some kind of bug.. It's a kind of magic...
I had the same problem.
The problem was in my Virtual host setting. I had the following settings in my Directory of my Virtual host:
<Directory /home/koen/zend/ZendCMS/public>
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride All
Order Deny,Allow
Allow from all
</Directory>
When I put a dash in front of MultiViews and that fixed the problem.
Like this:
<Directory /home/koen/zend/ZendCMS/public>
Options Indexes FollowSymLinks -MultiViews ExecCGI
AllowOverride All
Order Deny,Allow
Allow from all
</Directory>
Hope that helps
这篇关于Zend框架:“未找到url”只有索引控制器,只有小写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!