My routing is set up like this:
Route::set('default', '(<controller>(/<action>(/<id>)))')
->defaults(array(
'controller' => 'static',
'action' => 'index',
));
so that typing in:
calls action_index on Controller_Static as it should.
However, when I type in:
I expect it to say “cannot find Controller_Test” but instead, Kohana misses it and I get a message from Apache that says “The requested URL /testkohana4/index.php/test was not found on this server.“
Even when I put in a file under the controller directory called test.php with the class Controller_Test in it, I still get the page-not-found error.
How can I get Kohana to call a specific controller when I type its name in the URL?
Edit: The correct solution as provided in this answers comments was to change the .htaccess RewriteBase value to
There’s a mistake in your route. There is no forward slash at the beginning of
(<action> ...That should be(/<action> ...Those
<blocks>are dynamic segments in the URL. So in this example:Would result in this being called:
That should work for you. Hope that helped.