How to set App as site.com/ in Kohana3

Posted by Drew on Stack Overflow See other posts from Stack Overflow or by Drew
Published on 2010-06-06T03:36:52Z Indexed on 2010/06/06 3:42 UTC
Read the original article Hit count: 262

Filed under:
|

Hi all!

I've only just started using Kohana ( 3 hours ago), and so far it's blown my socks off (and I'm wearing slippers, so that's quite impressive).

Right now, I have a controller 'Controller_FrontPage' with associated views and models and I'm trying to get it accesible from the root of my website (eg, http://www.mysite.com/). If I edit the default controller in the bootstrap from:

Route::set('default', '(<controller>(/<action>(/<id>)))')
->defaults(array(
    'controller' => 'welcome',
    'action'     => 'index',
));

to 'controller' => '', I get an error, could not find controller_ (which makes sense), and if I change it to 'controller' => '/', I get an error, could not find controller_/ (which also makes sense).

If I set 'controller' => 'FrontPage', everything works fine, but all my links (html::anchor(...)) point to http://www.mysite.com/FrontPage/*.

Is there a way to have all the anchors point to http://www.mysite.com/*?

© Stack Overflow or respective owner

Related posts about php

Related posts about kohana-3