开发者

Problem with Kohana detect_uri() when mod_rewrite enabled

I am having problem in detecting current uri when the requested controller is index. (my index_file file name is index.php). It seems the problem is in detect_uri() function since it checks PATH_INFO before REQUEST_URI. when my url is http://localhost/myapp/index/ $_SERVER['PATH_INFO'] returns / and when it's http://localhost/myapp/index/ index/ it returns /index . For all other controllers requests it returns empty and the system works fine. I am using Ubuntu 10.10. I think when mod_rewrite is enabled in Debian system, $_SERVER['PATH_INFO'] does not returns the expected value. someone please explain.

开发者_如何学运维

Thanks


Related to mod_negotiation and being able to access /index.php as /index (without the extension).

Solution1:

a2dismod negotiation
service apache2 restart

Solution2:

patch kohana/system/libraries/Router.php

http://pastebin.com/7EtGGiaG

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜