2011-07-04 32 views
0

我在檢測當前URI時遇到問題,當請求的控制器是索引時。 (我的index_file文件名是index.php)。看起來問題在於detect_uri()函數,因爲它在REQUEST_URI之前檢查PATH_INFO。當我的網址是http://localhost/myapp/index/ $ _SERVER ['PATH_INFO']返回/,當它的http://localhost/myapp/index/索引/它返回/index。對於所有其他控制器請求,它將返回空白並且系統正常工作。我正在使用Ubuntu 10.10。我認爲當在Debian系統中啓用mod_rewrite時,$_SERVER['PATH_INFO']不會返回期望值。有人請解釋一下。問題Kohana detect_uri()mod_rewrite啓用時

感謝

+0

你要什麼它返回? –

+0

我希望它返回/索引爲url http:// localhost/myapp/index / – Shameer

回答

0

相關的mod_negotiation並能夠訪問/index.php/index(不包括擴展名)。

解決方法1:

a2dismod negotiation 
service apache2 restart 

溶液2:

patch kohana/system/libraries/Router.php 

http://pastebin.com/7EtGGiaG