从Kohana 2.x中的URL中删除index.php

从Kohana 2.x中的URL中删除index.php,php,kohana,Php,Kohana,我想将Kohana 2.x配置为具有以下格式的链接: http://localhost/mysite/web/admin/support 与此相反: http://localhost/mysite/web/admin/index.php/support 我从config.php文件中删除了index.php($config['index\u page']='';),并在.htaccess文件中添加了以下行: RewriteRule ^(.*)$ /index.php?/$1 [L] 如果将

我想将Kohana 2.x配置为具有以下格式的链接:

http://localhost/mysite/web/admin/support
与此相反:

http://localhost/mysite/web/admin/index.php/support
我从config.php文件
中删除了
index.php
($config['index\u page']='';)
,并在.htaccess文件中添加了以下行:

RewriteRule ^(.*)$ /index.php?/$1 [L]
如果将鼠标悬停在链接上方,您可以看到链接与我想要的一样,但始终存在以下错误:

未找到
在此服务器上找不到请求的URL/mysite/web/admin/support


我不知道如何更改我想要的配置。

在htaccess中编写以下代码:

RewriteEngine On

RewriteBase /

RewriteRule ^(application|modules|system) - [F,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule .* index.php/$0 [PT,L]
您还可以将config.php文件更改为:

$config['index_page']=''

再来一次

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule !^index\.php index.php%{REQUEST_URI} [L]  
尝试更多解决方案,然后查看

另请参见以下TUT::

现在它收到另一条消息:在该服务器上找不到请求的URL/index.php/support。我没有安装pear..您需要更改rewritebase以包含kohana存储的目录<代码>重写库/mysite/web/admin/