我已经安装了Kohana,当我开始编辑Kohana :: init和.htaccess以使其在没有'/index.php/'的情况下工作时,出现了一个问题.
I've installed Kohana and there is a problem appear, when I started to edit Kohana::init and .htaccess to make it work with no '/index.php/'
这就是我在做什么.
我的操作系统是Ubuntu linux 10.04
My OS is Ubuntu linux 10.04
我已将Kohana :: init'base_url'参数更改为'/kohana/',并且在.htaccess中RewriteBase相同
I've changed Kohana::init 'base_url' param to '/kohana/' and on .htaccess RewriteBase is the same
还在Kohana :: init上添加了'index_file =>''
Also added 'index_file => '' on Kohana::init
但是现在不起作用
它适用于 localhost/kohana/
但不适用于 localhost/custom/change
但是,它仍然适用于 localhost/index.php/custom/change
也许.htaccess根本不起作用?在Ubuntu上,从(.)点开始的文件被隐藏.现在被隐藏了.
Maybe .htaccess do not work at all? On Ubuntu files that starts from (.) point become hidden. and it is now hidden.
所以我花了2个小时来修复它,但仍然不知道问题出在哪里.
So I spent 2 hours trying to fix it, but still do not know where is the problem.
如果这里有人可以花时间修复它,将会很高兴.
Will be happy, if someone here can spend his time trying to fix it.
推荐答案检查Apache httpd.conf/vhost.conf中的AllowOverride All,否则将不会读取.htaccess文件.默认情况下它是禁用的. (没人知道为什么.)
Check your Apache httpd.conf/vhost.conf for AllowOverride All, else .htaccess files won't be read. It's disabled per default. (Nobody knows why.)
否则,发布您的RewriteRule集.否则只是猜测.
Otherwise post your RewriteRule set. Else it's just guessing.
更多推荐
Kohana URL重写
发布评论