问题
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/'
Here is what I'm doing.
My OS is Ubuntu linux 10.04
I've changed Kohana::init 'base_url' param to '/kohana/' and on .htaccess RewriteBase is the same
Also added 'index_file => '' on Kohana::init
But now it is not working
It works for http://localhost/kohana/
but do not works for http://localhost/custom/change
however, it still works for http://localhost/index.php/custom/change
Maybe .htaccess do not work at all? On Ubuntu files that starts from (.) point become hidden. and it is now hidden.
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.
回答1:
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.)
Otherwise post your RewriteRule set. Else it's just guessing.
来源:https://stackoverflow.com/questions/3689822/kohana-url-rewriting