Davit
Davit

Reputation: 362

Kohana_HTTP_Exception [ 404 ]: The requested URL Dave was not found on this server

A similar question has been asked before but solution to that didn't help me. I created a file "dave.php" in application/classes/Controller/ folder and I renamed the controller as well. Here's the code in dave.php file:

<?php defined('SYSPATH') OR die('No Direct Script Access');

Class Controller_Dave extends Controller
{
public function action_index()
{
    echo 'hello, world!';
}
}

kohana/index.php/dave - but I am still geting that error. Any ideas why?

Upvotes: 0

Views: 1873

Answers (2)

Max Sherbakov
Max Sherbakov

Reputation: 1955

That is my htaccess

RewriteEngine On

RewriteBase /

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

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

RewriteRule .* index.php/$0 [PT,L]

Check, is apache mod_rewrite enable and loaded at phpinfo(); In My case I've just enable mod_rewrite at apache.

 sudo a2enmod rewrite 

and than restart

sudo systemctl restart apache2

Check .htaccess rules.

And note, that Controllers names are case sensitivity.

Upvotes: 0

matino
matino

Reputation: 17725

It seems that you use Kohana 3.3, so the file name should be Dave.php not dave.php

Upvotes: 5

Related Questions