jnbdz
jnbdz

Reputation: 4383

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/jn

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.

Upvotes: 1

Views: 442

Answers (1)

gimpe
gimpe

Reputation: 1057

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

Upvotes: 2

Related Questions