Cannot access controllers in Kohana, works with index.php though
I using an Ubuntu server and I have mod_rewrite loaded but for some reason, when I type in my URL with the controller name. It shows me this:
Not Found:
The requested URL /jn/ was not found on this server.
That is weird because I do have a controller called jn
.
It does work if I go directly to:
index.php/j开发者_开发百科n
Also, why is it not sending me a Kohana error? If I made any mistake in the code it should of send me an Kohana error, no?
Logs:
[error] [client 184.162.240.112] File does not exist: /var/www/jn
[error] [client 184.162.240.112] File does not exist: /var/www/favicon.ico
Thanks in advance for any help.
For Ubuntu, you need to modify the default Apache configuratiopn /etc/apache2/sites-available/default to look like this:
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
</Directory>
The changes are:
- AllowOverride from None to all
- added line Allow from all
精彩评论